A code generator for the Bond scripting language.
More...
#include <bond/compiler/codegenerator.h>
A code generator for the Bond scripting language.
The CodeGenerator traverses the given parse tree and compiles it to bytecode that can be interpreted by a virtual machine. The bytecode is written to the given OutputStream in the CBO file format.
- See also
- ParseNode
◆ CodeGenerator()
Constructs a CodeGenerator object.
- Parameters
-
allocator | Allocator used for temporary memory allocations made by the Generate method. |
errorBuffer | Buffer where error messages are pushed when code generation errors are encountered. |
pointerSize | Size of pointers used by the target virtual machine that will execute the Bond bytecode. It is required to generate correct pointer arithmetic instructions for the target platform. |
◆ ~CodeGenerator()
Bond::CodeGenerator::~CodeGenerator |
( |
| ) |
|
|
inline |
◆ Generate()
Generates bytecode for a list of parse trees.
- Parameters
-
translationUnitList | A linked list of parse trees to be compiled to bytecode. |
stream | OutputStream to which the generated bytecode is written in the CBO file format. |
The documentation for this class was generated from the following file:
- include/bond/compiler/codegenerator.h