diff --git a/amalgamate.py b/amalgamate.py index 990b99a0..6ae1b4cb 100644 --- a/amalgamate.py +++ b/amalgamate.py @@ -2,7 +2,7 @@ with open("src/opcodes.h", "rt", encoding='utf-8') as f: OPCODES_TEXT = f.read() pipeline = [ - ["str.h", "builtins.h", "error.h"], + ["__stl__.h", "str.h", "builtins.h", "error.h"], ["obj.h", "iter.h", "parser.h", "pointer.h", "codeobject.h"], ["vm.h", "compiler.h"], ["pocketpy.h"] diff --git a/src/__stl__.h b/src/__stl__.h new file mode 100644 index 00000000..2172f3bc --- /dev/null +++ b/src/__stl__.h @@ -0,0 +1,18 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/src/compiler.h b/src/compiler.h index 893bda60..ecb1b751 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -1,9 +1,5 @@ #pragma once -#include -#include -#include - #include "parser.h" #include "error.h" #include "vm.h" diff --git a/src/error.h b/src/error.h index 4afbbd2c..6a5c60a0 100644 --- a/src/error.h +++ b/src/error.h @@ -1,9 +1,6 @@ #pragma once -#include -#include -#include - +#include "__stl__.h" #include "str.h" class NeedMoreLines { diff --git a/src/main.cpp b/src/main.cpp index a2f85132..e7cb21a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,6 @@ #include #include -#include #include "pocketpy.h" //#define PK_DEBUG_TIME diff --git a/src/obj.h b/src/obj.h index 4d6d834e..4f247837 100644 --- a/src/obj.h +++ b/src/obj.h @@ -1,13 +1,6 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include - +#include "__stl__.h" #include "str.h" typedef int64_t _Int; diff --git a/src/parser.h b/src/parser.h index c9790241..5c149a81 100644 --- a/src/parser.h +++ b/src/parser.h @@ -1,9 +1,5 @@ #pragma once -#include -#include -#include - #include "obj.h" typedef uint8_t _TokenType; diff --git a/src/pocketpy.h b/src/pocketpy.h index 7a8d32f2..7ca1a740 100644 --- a/src/pocketpy.h +++ b/src/pocketpy.h @@ -3,10 +3,6 @@ #include "vm.h" #include "compiler.h" -#include -#include -#include - #define PK_VERSION "0.2.0" #define BIND_NUM_ARITH_OPT(name, op) \ diff --git a/src/str.h b/src/str.h index 7551bc0c..46c4f560 100644 --- a/src/str.h +++ b/src/str.h @@ -1,9 +1,6 @@ #pragma once -#include -#include -#include -#include +#include "__stl__.h" typedef std::stringstream _StrStream;