Add an "iterate" keyword.

This commit is contained in:
Nigel Tao committed 2017-10-20 15:33:31 +11:00
1 parent 7b18295688
commit 51bd52239b
12 files changed
+253 -53

No files matched your search

+2 -1
View File
@@ -45,6 +45,7 @@ const (
bPrefix = "b_" // Derived from a function argument.
cPrefix = "c_" // Coroutine state.
fPrefix = "f_" // Struct field.
iPrefix = "i_" // Iterate variable.
lPrefix = "l_" // Limit length.
tPrefix = "t_" // Temporary local variable.
vPrefix = "v_" // Local variable.
@@ -554,7 +555,7 @@ func (g *gen) writeStruct(b *buffer, n *a.Struct) error {
b.writes("struct {\n")
if k.coroSuspPoint != 0 {
b.writes("uint32_t coro_susp_point;\n")
if err := g.writeVars(b, o.Body(), true); err != nil {
if err := g.writeVars(b, o.Body(), true, true); err != nil {
return err
}
}