mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Variables now persist between statements
This commit is contained in:
@@ -21,16 +21,16 @@ typedef struct Interpreter {
|
||||
LiteralArray stack;
|
||||
|
||||
//output
|
||||
// LiteralDictionary exports; //read-write - interface with Toy from C
|
||||
// LiteralDictionary exports; //TODO: read-write - interface with Toy from C
|
||||
PrintFn printOutput;
|
||||
PrintFn assertOutput;
|
||||
} Interpreter;
|
||||
|
||||
void initInterpreter(Interpreter* interpreter, unsigned char* bytecode, int length);
|
||||
void initInterpreter(Interpreter* interpreter);
|
||||
void freeInterpreter(Interpreter* interpreter);
|
||||
|
||||
//utilities for the host program
|
||||
void setInterpreterPrint(Interpreter* interpreter, PrintFn printOutput);
|
||||
void setInterpreterAssert(Interpreter* interpreter, PrintFn assertOutput);
|
||||
|
||||
void runInterpreter(Interpreter* interpreter);
|
||||
void runInterpreter(Interpreter* interpreter, unsigned char* bytecode, int length);
|
||||
|
||||
Reference in New Issue
Block a user