This class compiles littlefoot source code into a littlefoot::Program object which can be executed by a littlefoot::Runner.
More...
#include <juce_blocks_basics.h>
This class compiles littlefoot source code into a littlefoot::Program object which can be executed by a littlefoot::Runner.
◆ BlockPtr
◆ ExpPtr
◆ StatementPtr
◆ TokenType
◆ Compiler()
juce::littlefoot::Compiler::Compiler |
( |
| ) |
|
|
default |
◆ addNativeFunctions() [1/2]
void juce::littlefoot::Compiler::addNativeFunctions |
( |
const char *const * |
functionPrototypes | ) |
|
|
inline |
Gives the compiler a zero-terminated list of native function prototypes to use when parsing function calls.
◆ addNativeFunctions() [2/2]
template<typename RunnerType >
void juce::littlefoot::Compiler::addNativeFunctions |
( |
const RunnerType & |
runner | ) |
|
|
inline |
Tells the compiler to use the list of native function prototypes from this littlefoot::Runner object.
◆ compile()
Result juce::littlefoot::Compiler::compile |
( |
const String & |
sourceCode, |
|
|
uint32 |
defaultHeapSize |
|
) |
| |
|
inline |
Compiles a littlefoot program.
If there's an error, this returns it, otherwise the compiled bytecode is placed in the compiledObjectCode member.
◆ createFunctionID()
◆ getArgTypesFromFunctionName()
static Array<Type> juce::littlefoot::Compiler::getArgTypesFromFunctionName |
( |
const char * |
nameAndTypes | ) |
|
|
inlinestaticprivate |
◆ getCompiledProgram()
Program juce::littlefoot::Compiler::getCompiledProgram |
( |
| ) |
const |
|
inlinenoexcept |
After a successful compilation, this returns the finished Program.
◆ getTokenDescription()
static String juce::littlefoot::Compiler::getTokenDescription |
( |
TokenType |
t | ) |
|
|
inlinestaticprivate |
◆ getTypeName()
static String juce::littlefoot::Compiler::getTypeName |
( |
Type |
t | ) |
|
|
inlinestaticprivatenoexcept |
◆ getTypeOfVar()
static Type juce::littlefoot::Compiler::getTypeOfVar |
( |
const var & |
v | ) |
|
|
inlinestaticprivatenoexcept |
◆ tokenToType()
static Type juce::littlefoot::Compiler::tokenToType |
( |
TokenType |
t | ) |
|
|
inlinestaticprivatenoexcept |
◆ compiledObjectCode
Array<uint8> juce::littlefoot::Compiler::compiledObjectCode |
After a successful call to compile(), this contains the bytecode generated.
A littlefoot::Program object can be created directly from this array.
◆ nativeFunctions
The documentation for this struct was generated from the following file: