pub struct Compiler {
pub debug: u8,
/* private fields */
}
Expand description
Tokay compiler instance
A tokay compiler initializes a Tokay parser for later re-use when called multiple times.
The compiler works in a mode so that statics, variables and constants once built won’t be removed and can be accessed on later calls.
Fields§
§debug: u8
Implementations§
source§impl Compiler
impl Compiler
sourcepub fn new() -> Self
pub fn new() -> Self
Initialize a new compiler.
The compiler serves functions to compile Tokay source code into programs executable by the Tokay VM. It uses an intermediate language representation to implement derives of generics, statics, etc.
The compiler struct serves as some kind of helper that should be used during traversal of a Tokay program’s AST. It therefore offers functions to open particular blocks and handle symbols in different levels. Parselets are created by using the parselet_pop() function with provided parameters.