diff --git a/repl/lib_runner.c b/repl/lib_runner.c index 04fbc57..6089781 100644 --- a/repl/lib_runner.c +++ b/repl/lib_runner.c @@ -7,6 +7,7 @@ #include #include +#include typedef struct Toy_Runner { Toy_Interpreter interpreter; diff --git a/repl/lib_standard.c b/repl/lib_standard.c index 57fdbb3..92dfb90 100644 --- a/repl/lib_standard.c +++ b/repl/lib_standard.c @@ -2,9 +2,10 @@ #include "toy_memory.h" -#include #include +#include #include +#include static int nativeClock(Toy_Interpreter* interpreter, Toy_LiteralArray* arguments) { //no arguments diff --git a/source/toy_builtin.c b/source/toy_builtin.c index 399a57e..0dbfc11 100644 --- a/source/toy_builtin.c +++ b/source/toy_builtin.c @@ -4,6 +4,7 @@ #include "toy_literal.h" #include +#include //static math utils, copied from the interpreter static Toy_Literal addition(Toy_Interpreter* interpreter, Toy_Literal lhs, Toy_Literal rhs) { diff --git a/source/toy_compiler.c b/source/toy_compiler.c index dcdaef3..47893fd 100644 --- a/source/toy_compiler.c +++ b/source/toy_compiler.c @@ -9,6 +9,7 @@ #include "toy_console_colors.h" #include +#include void Toy_initCompiler(Toy_Compiler* compiler) { Toy_initLiteralArray(&compiler->literalCache); diff --git a/source/toy_literal.c b/source/toy_literal.c index 61944ce..abf17e7 100644 --- a/source/toy_literal.c +++ b/source/toy_literal.c @@ -8,6 +8,7 @@ #include "toy_console_colors.h" #include +#include //hash util functions static unsigned int hashString(const char* string, int length) { diff --git a/source/toy_literal.h b/source/toy_literal.h index ed7ad02..f205fbf 100644 --- a/source/toy_literal.h +++ b/source/toy_literal.h @@ -12,8 +12,6 @@ typedef int (*Toy_NativeFn)(struct Toy_Interpreter* interpreter, struct Toy_Lite typedef int (*Toy_HookFn)(struct Toy_Interpreter* interpreter, struct Toy_Literal identifier, struct Toy_Literal alias); typedef void (*Toy_PrintFn)(const char*); -#include - typedef enum { TOY_LITERAL_NULL, TOY_LITERAL_BOOLEAN, diff --git a/source/toy_refstring.c b/source/toy_refstring.c index 6ddb576..3fd0173 100644 --- a/source/toy_refstring.c +++ b/source/toy_refstring.c @@ -1,7 +1,5 @@ #include "toy_refstring.h" -#include - //memory allocation extern void* Toy_private_defaultMemoryAllocator(void* pointer, size_t oldSize, size_t newSize); static Toy_RefStringAllocatorFn allocate = Toy_private_defaultMemoryAllocator; diff --git a/source/toy_refstring.h b/source/toy_refstring.h index 02bbaf9..2928b6e 100644 --- a/source/toy_refstring.h +++ b/source/toy_refstring.h @@ -1,10 +1,9 @@ #pragma once -#include -#include - #include "toy_common.h" +#include + //memory allocation hook typedef void* (*Toy_RefStringAllocatorFn)(void* pointer, size_t oldSize, size_t newSize); TOY_API void Toy_setRefStringAllocatorFn(Toy_RefStringAllocatorFn);