Compiler.nodeOverride

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.

The return is a constant string that should be mixed in to the compiler generated in the client.

template Compiler(ParseTree T, alias Parser)
template nodeOverride (
string Cond
string Func
) {}

Members

Manifest constants

nodeOverride
enum nodeOverride;
Undocumented in source.

Meta