Began to reduce cpp feature usage in lexer and parser

This commit is contained in:
2024-12-02 22:25:39 -05:00
parent 69a9abcd59
commit 2fe708e4be
6 changed files with 288 additions and 282 deletions

View File

@ -385,6 +385,8 @@ bool set_capacity(Array<Type>* array, usize new_capacity)
// TODO(Ed) : This thing needs ALOT of work.
#pragma region HashTable
#define HashTable(Type) HashTable<Type>
template<class Type> struct HashTable;
struct HashTableFindResult {

View File

@ -133,12 +133,16 @@
#if GEN_DONT_USE_NAMESPACE || GEN_COMPILER_C
# if GEN_COMPILER_C
# define GEN_NS_PARSER_BEGIN
# define GEN_NS_PARSER_END
# define GEN_NS_ENUM_BEGIN
# define GEN_NS_ENUM_END
# define GEN_NS
# define GEN_NS_BEGIN
# define GEN_NS_END
# else
# define GEN_NS_PARSER_BEGIN namespace parser {
# define GEN_NS_PARSER_END }
# define GEN_NS_ENUM_BEGIN namespace gen_internal_enums {
# define GEN_NS_ENUM_END }
# define GEN_NS ::
@ -146,6 +150,8 @@
# define GEN_NS_END
# endif
#else
# define GEN_NS_PARSER_BEGIN namespace parser {
# define GEN_NS_PARSER_END }
# define GEN_NS_ENUM_BEGIN namespace gen_internal_enums {
# define GEN_NS_ENUM_END }
# define GEN_NS gen::