mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Native functions are working
This commit is contained in:
@@ -29,6 +29,12 @@ typedef struct Interpreter {
|
||||
bool panic;
|
||||
} Interpreter;
|
||||
|
||||
//for native function API
|
||||
typedef int (*NativeFn)(Interpreter* interpreter, LiteralArray* arguments);
|
||||
bool injectNativeFn(Interpreter* interpreter, char* name, NativeFn func);
|
||||
bool parseIdentifierToValue(Interpreter* interpreter, Literal* literalPtr);
|
||||
|
||||
//init & free
|
||||
void initInterpreter(Interpreter* interpreter);
|
||||
void freeInterpreter(Interpreter* interpreter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user