Remove metaprogram
This commit is contained in:
@@ -4,10 +4,6 @@ mkdir build
|
|||||||
cd build
|
cd build
|
||||||
|
|
||||||
set flags=/EHsc- /MD /Zi /FC /nologo /WX /W3 /wd4200 /wd4334 /diagnostics:column -DDEBUG_BUILD=1
|
set flags=/EHsc- /MD /Zi /FC /nologo /WX /W3 /wd4200 /wd4334 /diagnostics:column -DDEBUG_BUILD=1
|
||||||
|
|
||||||
cl %flags% -Fe:metaprogram.exe -I../src ../src/metaprogram/metaprogram.cpp
|
|
||||||
metaprogram.exe
|
|
||||||
|
|
||||||
set libs=../src/external/SDL/win32-static/SDL3-static.lib ../src/external/SDL/win32-static/SDL_uclibc.lib kernel32.lib gdi32.lib user32.lib Imm32.lib ole32.lib Shell32.lib OleAut32.lib Cfgmgr32.lib Setupapi.lib Advapi32.lib version.lib winmm.lib
|
set libs=../src/external/SDL/win32-static/SDL3-static.lib ../src/external/SDL/win32-static/SDL_uclibc.lib kernel32.lib gdi32.lib user32.lib Imm32.lib ole32.lib Shell32.lib OleAut32.lib Cfgmgr32.lib Setupapi.lib Advapi32.lib version.lib winmm.lib
|
||||||
cl %flags% ../src/text_editor/text_editor.cpp -Fe:te.exe -I../src/external/SDL/include -I../src/external/lua/src -I../src/external/glad -I../src/ %libs% -link /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:MSVCRTD
|
cl %flags% ../src/text_editor/text_editor.cpp -Fe:te.exe -I../src/external/SDL/include -I../src/external/lua/src -I../src/external/glad -I../src/ %libs% -link /SUBSYSTEM:WINDOWS /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:MSVCRTD
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
#include "basic/basic.h"
|
|
||||||
#include "basic/basic.cpp"
|
|
||||||
|
|
||||||
void Test() {
|
|
||||||
// Basic constructors
|
|
||||||
{
|
|
||||||
String a = "thing";
|
|
||||||
String b("thing");
|
|
||||||
Assert(a == b);
|
|
||||||
String c = {};
|
|
||||||
Assert(c.len == 0 && c.data == NULL);
|
|
||||||
Assert(a != c);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accessors
|
|
||||||
{
|
|
||||||
String a = "thing";
|
|
||||||
Assert(Skip(a, 1) == "hing");
|
|
||||||
Assert(Chop(a, 1) == "thin");
|
|
||||||
Assert(GetPrefix(a, 1) == "t");
|
|
||||||
Assert(GetPostfix(a, 1) == "g");
|
|
||||||
Assert(GetSlice(a, 0) == "thing");
|
|
||||||
Assert(GetSlice(a, 0, -1) == "thin");
|
|
||||||
Assert(GetSlice(a, 1, -1) == "hin");
|
|
||||||
Assert(GetSlice(a, -2, -1) == "n");
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
Scratch scratch;
|
|
||||||
String16 a = Format16(scratch, "Memes %d", 30);
|
|
||||||
Assert(a == u"Memes 30");
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Vec2 a = {1,1};
|
|
||||||
Vec2 b = 2 + a;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
Scratch scratch;
|
|
||||||
String data = ReadFile(scratch, "../data/init.lua");
|
|
||||||
Array<String> array = {scratch};
|
|
||||||
|
|
||||||
Add(&array, String{"String BaseLuaConfig = R\"==(\n"});
|
|
||||||
Add(&array, data);
|
|
||||||
Add(&array, String{"\n)==\";\n"});
|
|
||||||
String result = Merge(scratch, array, "");
|
|
||||||
WriteFile("../src/text_editor/generated_config.cpp", result);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user