AST Explorer
Explore how code becomes trees. Select a snippet, then use the tabs to inspect its AST, traversals, symbol table, and transformations.
Simple Arithmetic
Source Code
Loading editor...
Click a node to highlight its source line
▾ProgramProgram
▾LetStmtlet x = 3 + 4 * 2L1
Varx(binding)L1
▾BinOp+L1
IntLit3L1
▾BinOp*L1
IntLit4L1
IntLit2L1
▾LetStmtlet y = x + 1L2
Vary(binding)L2
▾BinOp+L2
Varx(reference)L2
IntLit1L2
ProgramLetStmtIfStmtFuncDefBlockReturnStmtBinOpUnaryOpIntLitStrLitVarParam
Source Code
Loading editor...
Click a node to highlight its source line
▾ProgramProgram
▾LetStmtlet x = 3 + 4 * 2L1
Varx(binding)L1
▾BinOp+L1
IntLit3L1
▾BinOp*L1
IntLit4L1
IntLit2L1
▾LetStmtlet y = x + 1L2
Vary(binding)L2
▾BinOp+L2
Varx(reference)L2
IntLit1L2
ProgramLetStmtIfStmtFuncDefBlockReturnStmtBinOpUnaryOpIntLitStrLitVarParam