diff --git a/src/clox/dbg.d b/src/clox/dbg.d index 5e3575a..0250222 100644 --- a/src/clox/dbg.d +++ b/src/clox/dbg.d @@ -1,7 +1,6 @@ module clox.dbg; import core.stdc.stdio; -import std.functional : ctEval; import std.traits : EnumMembers, hasUDA, getUDAs; import clox.chunk; diff --git a/src/clox/main.d b/src/clox/main.d index 5539af8..77fbfab 100644 --- a/src/clox/main.d +++ b/src/clox/main.d @@ -58,8 +58,8 @@ int runMain(ulong argc, const char** argv){ if(arg[0] == '-'){ foreach(c; arg[1 .. $]){ switch(c){ - debug(printCode) case 'p': vm.printCode = true; break; - debug(traceExec) case 't': vm.traceExec = true; break; + debug(printCode){ case 'p': vm.printCode = true; break; } + debug(traceExec){ case 't': vm.traceExec = true; break; } default: usage(); return 64; diff --git a/src/clox/parser.d b/src/clox/parser.d index 4a2a538..b214339 100644 --- a/src/clox/parser.d +++ b/src/clox/parser.d @@ -1,7 +1,6 @@ module clox.parser; import core.stdc.stdio; -import std.functional : ctEval; import clox.scanner; import clox.compiler; diff --git a/src/clox/util.d b/src/clox/util.d index f9e9051..ef2d96e 100644 --- a/src/clox/util.d +++ b/src/clox/util.d @@ -3,7 +3,11 @@ module clox.util; import core.stdc.stdio; import core.stdc.stdlib; import core.stdc.string; -import std.functional : ctEval; + +auto ctEval(alias v)(){ + enum evaled = v; + return evaled; +} enum Colour : string{ Black = "30", Red = "31", Green = "32", Yellow = "33", Blue = "34", Pink = "35", Cyan = "36",