LKAST class documentation
LKAST : NSObjectOverview
Root class for AST nodes. Every node in the abstract syntax tree inherits from this. It stores the parent, allowing navigation up the tree, and a pointer to the symbol table for this scope.
Default
- + (NSMutableDictionary *) code
Returns the AST nodes available at runtime for subclasses and categories.
- - (LKModule *) module
Returns the module containing the current AST.
- - (id) initWithSymbolTable: (LKSymbolTable *)aSymbolTable
Initialise a new AST node with the specified symbol table.
- - (void) inheritSymbolTable: (LKSymbolTable *)aSymbolTable
Inherits the given symbol table from the parent.
- - (void) setParent: (LKAST *)aNode
Sets the parent of this node. Also sets connections between the nodes' symbol tables.
- - (LKAST *) parent
Returns the parent of this AST node.
- - (LKSymbolTable *) symbols
Returns the symbol table for this node.
- - (BOOL) checkWithErrorReporter: (id <LKCompilerDelegate>)errorReporter
Performs semantic analysis on this node and all of its children, reporting errors and warnings to the object specified by the argument.
- - (void*) compileWithGenerator: (id <LKCodeGenerator>)aGenerator
Compile this AST node with the specified code generator.