mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 08:47:28 +01:00
Generate C code for "var x T = foo?()".
This commit is contained in:
1 parent
f6501ec2d9
commit
e6f5fd7f53
3 files changed
+37
-1
No files matched your search
@@ -883,7 +883,11 @@ func (g *gen) writeStatement(n *a.Node, depth uint32) error {
|
||||
|
||||
case a.KVar:
|
||||
n := n.Var()
|
||||
// TODO: consider suspendible calls.
|
||||
if v := n.Value(); v != nil {
|
||||
if err := g.writeSuspendibles(v, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
g.printf("%s%s = ", vPrefix, n.Name().String(g.tm))
|
||||
if v := n.Value(); v != nil {
|
||||
if err := g.writeExpr(v, replaceCallSuspendibles, parenthesesMandatory, 0); err != nil {
|
||||
|
||||
Reference in new issue
Block a user