Compiler

Undocumented in source.

Members

Mixin templates

compile
mixintemplate compile()

Compile the tree to an inline expression.

compileStatements
mixintemplate compileStatements()

Compile the tree to a list of statements.

Static functions

compileChild
string compileChild()
Undocumented in source. Be warned that the author may not have intended to support it.
compileChildNodes
string[] compileChildNodes()
Undocumented in source. Be warned that the author may not have intended to support it.
compileNode
auto compileNode()
Undocumented in source. Be warned that the author may not have intended to support it.
processTypeAnnotations
string processTypeAnnotations()
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

compilerOverride
template compilerOverride(string N, string F)

A string-match function. If the name of a node matches N, then the an override of 'compileNode' is generated returning the value F in the generated compiler.

nodeOverride
template nodeOverride(string Cond, string Func)

Add an match funtion to the compile tree. The condition is a compile-time expression which is used in a static if statement: static if(Cond) in the declaration of the overriden function, in the generated compiler. Func is the body of the required operation if the condition succeeds. The generated function is always called compileNode, with a static 'if' represented by the Cond parameter. Inside the function, the parse tree can be accessed as the variable T, which is the value passed as the first parameter to the Compile template.

Meta