mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Generate C code for "a or b or c".
This commit is contained in:
1 parent
540274b57d
commit
ce2720fca1
5 files changed
+65
-3
No files matched your search
@@ -1240,7 +1240,15 @@ func (g *gen) writeExprAs(lhs *a.Expr, rhs *a.TypeExpr, rp replacementPolicy, de
|
||||
}
|
||||
|
||||
func (g *gen) writeExprAssociativeOp(n *a.Expr, rp replacementPolicy, depth uint32) error {
|
||||
// TODO.
|
||||
opName := cOpNames[0xFF&n.ID0().Key()]
|
||||
for i, o := range n.Args() {
|
||||
if i != 0 {
|
||||
g.writes(opName)
|
||||
}
|
||||
if err := g.writeExpr(o.Expr(), rp, parenthesesMandatory, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user