Skip to content

Commit

Permalink
Fix bug in flow optmization.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Nov 11, 2024
1 parent 3b166ca commit 94b8c33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Compiler/compilerLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ def compile_file(self):
continue
m = re.match(r"(\s*)if(\W.*):", line)
if m:
while if_stack and if_stack[-1][0] == m.group(1):
if_stack.pop()
if_stack.append((m.group(1), len(output)))
output.append("%s@if_(%s)\n" % (m.group(1), m.group(2)))
output.append("%sdef _():\n" % (m.group(1)))
Expand Down

0 comments on commit 94b8c33

Please sign in to comment.