Primary compiler class. This class is an AST visitor that walks the AST tree generated by a AST::ASTBuilder instance to generate an InstructionSequence instance.
More...
#include <compiler.hpp>
Primary compiler class. This class is an AST visitor that walks the AST tree generated by a AST::ASTBuilder instance to generate an InstructionSequence instance.
◆ compileFile()
CodeBlock* TorqueScript::Compiler::compileFile |
( |
const std::string & |
path, |
|
|
StringTable * |
stringTable |
|
) |
| |
Ask the compiler to generate a codeblock from the provided file.
- Parameters
-
path | The path to load from. |
◆ compileStream()
CodeBlock* TorqueScript::Compiler::compileStream |
( |
std::istream & |
input, |
|
|
StringTable * |
stringTable |
|
) |
| |
Ask the compiler to generate a codeblock from the provided stream.
- Parameters
-
input | The input to generate from. |
- Returns
- A CodeBlock representing the compiled output. If an error has occurred, nullptr is returned.
◆ compileString()
CodeBlock* TorqueScript::Compiler::compileString |
( |
const std::string & |
input, |
|
|
StringTable * |
stringTable |
|
) |
| |
Ask the compiler to generate a codeblock from the provided string.
- Parameters
-
input | The string to generate from. |
The documentation for this class was generated from the following file: