From d69a64dbfb2ccfaa4e42f082773a8299d4991bc5 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 5 Oct 2019 10:30:01 -0300 Subject: [PATCH] analysis: add bump-dump scope to loop analysis --- src/analysis.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index cb392f3..b3faa8a 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -432,10 +432,13 @@ pub const Analyzer = struct { try self.expectSymUnTypeEnum(expr, .Bool); } - // TODO bump-dump scope + try ctx.bumpScope("loop"); + for (loop.then_branch.toSlice()) |then_stmt| { try self.stmtPass(ctx, then_stmt); } + + ctx.dumpScope(); }, // For (creates 1 scope) receives arrays, which we dont have yet