[This is preliminary documentation and is subject to change.]
Performs code generation with the output of the parser.
Declaration Syntax
C# |
public Token GenerateCode( ProductionToken parseOutput )
Parameters
- parseOutput (ProductionToken)
- A ProductionToken returned from the Parse(String, String) method. This is the root token of an AST created by the parser.
Return Value
Either the GeneratedToken returned by the topmost
generation method in the IGeneratorClass object, or an ErrorToken with a single error or a collection of
errors.
Remarks
Code generation is performed by calling the generation methods
from your IGeneratorClass linked to each production in the
abstract syntax tree (AST) supplied in the parseOutput parameter. These
methods are called bottom up. The entire calling sequence is repeated for
each code generation pass. The number of passes is retrieved from your
IGeneratorClass object's NumberOfPasses property.