JSSpecCompiler: Add control flow building pass

This commit is contained in:
Dan Klishch 2023-08-19 14:24:50 -04:00 committed by Andrew Kaster
commit ff44aea917
Notes: sideshowbarker 2024-07-16 18:26:46 +09:00
10 changed files with 222 additions and 2 deletions

View file

@ -106,3 +106,29 @@ TreeList
ReturnNode
Var b
===== AST after cfg-building =====
f():
TreeList
IfElseIfChain
UnresolvedReference cond1
TreeList
BinaryOperation Declaration
Var a
MathematicalConstant 1
IfElseIfChain
UnresolvedReference cond2
TreeList
BinaryOperation Declaration
Var b
Var a
TreeList
BinaryOperation Declaration
Var b
MathematicalConstant 3
TreeList
BinaryOperation Declaration
Var b
MathematicalConstant 4
ReturnNode
Var b