%
% This file is automatically generated from 03-ast.json using gendoc.py.
% Do not edit by hand.
%
\typedecl{\type{ID}}{String}
\typedecl{\type{NUM}}{Integer}
\typedecl{\type{STRING}}{String}
\datadecl{\type{Main}}{\ast{Main}(definitions : [\type{Definition}])}
\datadecl{\type{Definition}}{\ast{DefProgram}(body : \type{Statement})
\ALT
\ast{DefInteractiveProgram}(branches : [\type{SwitchBranch}])
\ALT
\ast{DefProcedure}(name : \type{ID}, parameters : [\type{ID}], body : \type{Statement})
\ALT
\ast{DefFunction}(name : \type{ID}, parameters : [\type{ID}], body : \type{Statement})
\ALT
\ast{DefType}(typeName : \type{ID}, constructorDeclarations : [\type{ConstructorDeclaration}])}
\datadecl{\type{Statement}}{\ast{StmtBlock}(statements : [\type{Statement}])
\ALT
\ast{StmtReturn}(result : \type{Expression})
\ALT
\ast{StmtIf}(condition : \type{Expression}, thenBlock : \type{Statement}, elseBlock : (\type{Statement})?)
\ALT
\ast{StmtRepeat}(times : \type{Expression}, body : \type{Statement})
\ALT
\ast{StmtForeach}(pattern : \type{Pattern}, range : \type{Expression}, body : \type{Statement})
\ALT
\ast{StmtWhile}(condition : \type{Expression}, body : \type{Statement})
\ALT
\ast{StmtSwitch}(subject : \type{Expression}, branches : [\type{SwitchBranch}])
\ALT
\ast{StmtAssignVariable}(variable : \type{ID}, value : \type{Expression})
\ALT
\ast{StmtAssignTuple}(variables : [\type{ID}], value : \type{Expression})
\ALT
\ast{StmtProcedureCall}(procedureName : \type{ID}, args : [\type{Expression}])}
\datadecl{\type{SwitchBranch}}{\ast{SwitchBranch}(pattern : \type{Pattern}, body : \type{Statement})}
\datadecl{\type{Pattern}}{\ast{PatternWildcard}()
\ALT
\ast{PatternVariable}(variableName : \type{ID})
\ALT
\ast{PatternNumber}(number : \type{NUM})
\ALT
\ast{PatternStructure}(constructorName : \type{ID}, parameters : [\type{ID}])
\ALT
\ast{PatternTuple}(parameters : [\type{ID}])
\ALT
\ast{PatternTimeout}(timeout : \type{NUM})}
\datadecl{\type{Expression}}{\ast{ExprVariable}(variableName : \type{ID})
\ALT
\ast{ExprConstantNumber}(number : \type{NUM})
\ALT
\ast{ExprConstantString}(string : \type{STRING})
\ALT
\ast{ExprChoose}(condition : \type{Expression}, trueExpr : \type{Expression}, falseExpr : \type{Expression})
\ALT
\ast{ExprMatching}(subject : \type{Expression}, branches : [\type{MatchingBranch}])
\ALT
\ast{ExprList}(elements : [\type{Expression}])
\ALT
\ast{ExprRange}(first : \type{Expression}, second : (\type{Expression})?, last : \type{Expression})
\ALT
\ast{ExprTuple}(elements : [\type{Expression}])
\ALT
\ast{ExprStructure}(constructorName : \type{ID}, fieldBindings : [\type{FieldBinding}])
\ALT
\ast{ExprStructureUpdate}(constructorName : \type{ID}, original : \type{Expression}, fieldBindings : [\type{FieldBinding}])
\ALT
\ast{ExprFunctionCall}(functionName : \type{ID}, args : [\type{Expression}])}
\datadecl{\type{MatchingBranch}}{\ast{MatchingBranch}(pattern : \type{Pattern}, body : \type{Expression})}
\datadecl{\type{ConstructorDeclaration}}{\ast{ConstructorDeclaration}(constructorName : \type{ID}, fieldNames : [\type{ID}])}
\datadecl{\type{FieldBinding}}{\ast{FieldBinding}(fieldName : \type{ID}, value : \type{Expression})}
%
% This file is automatically generated from 03-ast.json using gendoc.py.
% Do not edit by hand.
%
