Piglet Part4 - AST
A language named Piglet to describe the flow chart
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”, ...