1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

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
parent c74e2d04d1
commit ff44aea917
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