Merged standard and timer, resolved #48

This commit is contained in:
2023-02-13 13:58:41 +00:00
parent 16b71ba6f4
commit eb8e522bf2
8 changed files with 1857 additions and 1946 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
#pragma once
#include "toy_interpreter.h"
int Toy_hookCompound(Toy_Interpreter* interpreter, Toy_Literal identifier, Toy_Literal alias);

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,7 @@
#include "repl_tools.h"
#include "lib_about.h"
#include "lib_compound.h"
#include "lib_standard.h"
#include "lib_runner.h"
// #include "lib_timer.h"
#include "toy_console_colors.h"
@@ -30,10 +28,8 @@ void repl(const char* initialInput) {
//inject the libs
Toy_injectNativeHook(&interpreter, "about", Toy_hookAbout);
Toy_injectNativeHook(&interpreter, "compound", Toy_hookCompound);
Toy_injectNativeHook(&interpreter, "standard", Toy_hookStandard);
Toy_injectNativeHook(&interpreter, "runner", Toy_hookRunner);
// Toy_injectNativeHook(&interpreter, "timer", Toy_hookTimer);
for(;;) {
if (!initialInput) {

View File

@@ -1,9 +1,7 @@
#include "repl_tools.h"
#include "lib_about.h"
#include "lib_compound.h"
#include "lib_standard.h"
#include "lib_runner.h"
// #include "lib_timer.h"
#include "toy_console_colors.h"
@@ -113,10 +111,8 @@ void Toy_runBinary(const unsigned char* tb, size_t size) {
//inject the libs
Toy_injectNativeHook(&interpreter, "about", Toy_hookAbout);
Toy_injectNativeHook(&interpreter, "compound", Toy_hookCompound);
Toy_injectNativeHook(&interpreter, "standard", Toy_hookStandard);
Toy_injectNativeHook(&interpreter, "runner", Toy_hookRunner);
// Toy_injectNativeHook(&interpreter, "timer", Toy_hookTimer);
Toy_runInterpreter(&interpreter, tb, (int)size);
Toy_freeInterpreter(&interpreter);