mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Don't have suspend state if we don't suspend.
This commit is contained in:
1 parent
a8423cee70
commit
018d8d1893
4 files changed
+18
-127
No files matched your search
@@ -97,9 +97,21 @@ func (g *gen) writeFuncImpl(b *buffer, n *a.Func) error {
|
||||
}
|
||||
b.writes("{\n")
|
||||
b.writex(k.bHeader)
|
||||
b.writex(k.bBodyResume)
|
||||
if k.suspendible {
|
||||
if k.coroSuspPoint > 0 {
|
||||
b.writex(k.bBodyResume)
|
||||
} else {
|
||||
b.writes("{\n")
|
||||
}
|
||||
}
|
||||
b.writex(k.bBody)
|
||||
b.writex(k.bBodySuspend)
|
||||
if k.suspendible {
|
||||
if k.coroSuspPoint > 0 {
|
||||
b.writex(k.bBodySuspend)
|
||||
} else {
|
||||
b.writes("}\n")
|
||||
}
|
||||
}
|
||||
b.writex(k.bFooter)
|
||||
b.writes("}\n\n")
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user