{
"type": "Module",
"statements": [] // These need to be functions or declaration statements (for globals)
}
{
"type": "CodeBlock",
"statements": [] // These can be any node specified below
}
{
"type": "Function",
"parameters": ["DataType", "DataType", ...],
"ret-type": "DataType",
"code-block": {"type": "CodeBlock", ...}
}
{
"type": "IfBlock",
"statements": [
{
"condition": "...",
"code-block": {"type": "CodeBlock", ...},
}
],
"default": {"type": "CodeBlock", ...}
}
{
"type": "Loop",
"condition": "...",
"code-block": {"type": "CodeBlock", ...}
}
{
"type": "DeclarationStatement",
"dst": "some variable",
"src": "...",
"dtype": "DataType"
}
{
"type": "AssignmentStatement",
"dst": "some variable",
"src": "..."
}
{
"type": "ReturnStatement",
"value": "...",
"dtype": "DataType"
}
{
"type": "Literal",
"value": "...",
"dtype": "DataType"
}
{
"type": "Variable",
"name": "...",
"dtype": "DataType"
}
{
"type": "Expression",
"left-operand": "...",
"operator": "...",
"right-operand": "...",
"dtype": "DataType"
}
{
"type": "FunctionCall",
"function-name": "...",
"parameters": ["..."],
"dtype": "DataType"
}