diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/compile/compile.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/compile/compile.go b/internal/compile/compile.go index 7ba17eb..0f3f264 100644 --- a/internal/compile/compile.go +++ b/internal/compile/compile.go @@ -1086,7 +1086,9 @@ func (fcomp *fcomp) stmt(stmt syntax.Stmt) { fcomp.ifelse(stmt.Cond, body, done) fcomp.block = body + fcomp.loops = append(fcomp.loops, loop{break_: done, continue_: head}) fcomp.stmts(stmt.Body) + fcomp.loops = fcomp.loops[:len(fcomp.loops)-1] fcomp.jump(head) fcomp.block = done |