Added support for predefining preprocessor defines before parsing strings of code.

This prevents issues for preprocessor defines not getting treated properly for specific circumstances (such as macro wrappers for specifiers).
This commit is contained in:
2023-11-21 20:09:14 -05:00
parent be023325a9
commit 772db608be
6 changed files with 57 additions and 18 deletions

View File

@ -155,6 +155,11 @@ extern CodeType t_typename;
#pragma endregion Macros
// Used by the lexer to persistently treat all these identifiers as preprocessor defines.
// Populate with strings via gen::get_cached_string.
// Functional defines must have format: id( ;at minimum to indicate that the define is only valid with arguments.
extern Array< StringCached > PreprocessorDefines;
#ifdef GEN_EXPOSE_BACKEND
// Global allocator used for data with process lifetime.