zengine/engine/tools/make_plugin/src/macro_parse.h

17 lines
648 B
C
Raw Normal View History

2024-07-27 14:24:46 +08:00
#include <memory_resource>
namespace pmr {
using std::pmr::monotonic_buffer_resource;
using std::pmr::vector;
using std::pmr::string;
}
inline pmr::monotonic_buffer_resource pool;
inline const char* MODULE_DEPENDENCY = "MODULE_DEPENDENCY";
inline const char* IMPLEMENT_DYNAMIC_MODULE = "IMPLEMENT_DYNAMIC_MODULE";
inline const char* IMPLEMENT_STATIC_MODULE = "IMPLEMENT_STATIC_MODULE";
struct MacroData {
const char* macro{ nullptr };
pmr::vector<pmr::string> args;
MacroData() :args(&pool) {}
MacroData(const pmr::vector<pmr::string>& args) :args(args) {}
};
pmr::vector<MacroData> readMacroFile(const char* file_path);