diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index dc6572b..c3c6395 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -36,17 +36,20 @@ shared_ptr Target::forName(string_view name) { } } shared_ptr target; - #define ADDTARGET(X) target = make_shared(X()); break; + #define ADDTARGET(X) target = make_shared(X()); switch (selected) { -#ifdef LUA_HPP - case LUA: ADDTARGET(LuaTarget) -#endif -#ifdef JS_HPP - case JS: ADDTARGET(JsTarget) -#endif -#ifdef PY_HPP - case PY: ADDTARGET(PyTarget) -#endif + case LUA: + #ifdef LUA_HPP + ADDTARGET(LUA_HPP); break; + #endif + case JS: + #ifdef JS_HPP + ADDTARGET(JS_HPP); break; + #endif + case PY: + #ifdef PY_HPP + ADDTARGET(PY_HPP); break; + #endif case NONE: default: { if (not name.empty()) { diff --git a/src/headers/transpiler/implementations/Js.hpp b/src/headers/transpiler/implementations/Js.hpp index 925b63b..ab0aa2e 100644 --- a/src/headers/transpiler/implementations/Js.hpp +++ b/src/headers/transpiler/implementations/Js.hpp @@ -1,5 +1,5 @@ #ifndef JS_HPP -#define JS_HPP +#define JS_HPP JsTarget struct JsTarget: Target {}; diff --git a/src/headers/transpiler/implementations/Lua.hpp b/src/headers/transpiler/implementations/Lua.hpp index 1cb00e7..b059062 100644 --- a/src/headers/transpiler/implementations/Lua.hpp +++ b/src/headers/transpiler/implementations/Lua.hpp @@ -1,5 +1,5 @@ #ifndef LUA_HPP -#define LUA_HPP +#define LUA_HPP LuaTarget struct LuaTarget: Target {}; diff --git a/src/headers/transpiler/implementations/Py.hpp b/src/headers/transpiler/implementations/Py.hpp index e9c9fb9..a5d14ec 100644 --- a/src/headers/transpiler/implementations/Py.hpp +++ b/src/headers/transpiler/implementations/Py.hpp @@ -1,5 +1,5 @@ #ifndef PY_HPP -#define PY_HPP +#define PY_HPP PyTarget struct PyTarget: Target {};