mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-19 16:54:08 +10:00
Merged standard and timer, resolved #48
This commit is contained in:
1603
repl/lib_compound.c
1603
repl/lib_compound.c
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "toy_interpreter.h"
|
||||
|
||||
int Toy_hookCompound(Toy_Interpreter* interpreter, Toy_Literal identifier, Toy_Literal alias);
|
||||
|
||||
1539
repl/lib_standard.c
1539
repl/lib_standard.c
File diff suppressed because it is too large
Load Diff
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user