AST
In short
- prog { type: “prog”, consequent: [ …AST ] }
- node { type: “node”, value: string }
- if { type: “if”, test: AST, consequent: [ …AST ], alternate: AST }
- switch { type: “switch”, discriminant: AST, cases: [ …AST ] }
- case { type: “case”, test: AST, consequent: [ …AST ] }
- while { type: “while”, test: AST, consequent: [ …AST ] }
- do … while { type: “do-while”, test: AST, consequent: [ …AST ] }
- break { type: “break” }
- continue { type: “continue” }