Reference
Typed Program Representation
Look up syntax, contracts, layouts, algorithms, and exact behavior.
The compiler output is a discriminated token graph. It is not a direct parser tree: every node receives a runtime token kind and only the fields needed by evaluation. Parser details such as whitespace and grammar helper productions are removed before interpretation, so reconstruction follows the runtime model instead of the grammar.
Program = { token: Program, classes: Class[] }
Class = {
token: Class;
name: string;
globalVars: Definition[];
functions: Func[];
construct?: Constructor;
}
Func = {
token: Func;
parent: string;
name: string;
args?: ArgsDefine;
within: Token[];
}
Variable = {
token: Variable;
scope?: ScopeSpec;
variableName: string;
type: ValueType;
typeStr: string;
}Definitions carry declared type strings; primitives are converted into typed Value nodes; arithmetic operators are represented as left expression plus ordered operation tail; function-call arguments are normalized into arrays even when the source contains one argument.