Name correction for parser switch case macros

This commit is contained in:
Edward R. Gonzalez 2024-12-16 15:05:23 -05:00
parent adbcb2a83b
commit 6533a3be29
5 changed files with 23 additions and 23 deletions

View File

@ -987,7 +987,7 @@ CodeBody parse_class_struct_body( TokType which, Token name )
// <Attributes>
}
//! Fallthrough intended
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES:
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIER_CASES:
{
Specifier specs_found[16] = { Spec_NumSpecifiers };
s32 NumSpecifiers = 0;
@ -1000,7 +1000,7 @@ CodeBody parse_class_struct_body( TokType which, Token name )
switch ( spec )
{
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES:
GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIER_CASES:
break;
case Spec_Consteval:
@ -3993,7 +3993,7 @@ CodeFriend parser_parse_friend()
switch ( spec )
{
GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES:
GEN_PARSER_FRIEND_ALLOWED_SPECIFIER_CASES:
break;
default :
@ -4111,7 +4111,7 @@ CodeFn parser_parse_function()
switch ( spec )
{
GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES:
GEN_PARSER_FUNCTION_ALLOWED_SPECIFIER_CASES:
break;
default:
@ -4212,7 +4212,7 @@ CodeOperator parser_parse_operator()
switch ( spec )
{
GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES:
GEN_PARSER_OPERATOR_ALLOWED_SPECIFIER_CASES:
break;
default:
@ -4445,7 +4445,7 @@ CodeTemplate parser_parse_template()
switch ( spec )
{
GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES:
GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIER_CASES:
break;
case Spec_Consteval :

View File

@ -1,6 +1,6 @@
// These macros are used in the swtich cases within parser.cpp
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIER_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
@ -13,7 +13,7 @@ case Tok_Spec_Static: \
case Tok_Spec_Volatile: \
case Tok_Spec_Virtual
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES \
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIER_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_Explicit: \
@ -50,12 +50,12 @@ case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Inline: \
case Spec_ForceInline
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Consteval: \
case Spec_Constexpr: \
@ -66,7 +66,7 @@ case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_ForceInline: \
@ -74,7 +74,7 @@ case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \

View File

@ -134,7 +134,7 @@ CodeFn parser_parse_function()
switch ( spec )
{
GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES:
GEN_PARSER_FUNCTION_ALLOWED_SPECIFIER_CASES:
break;
default:

View File

@ -57,8 +57,8 @@ The keywords supported for the preprocessor are:
Each directive `#` line is considered one preproecessor unit, and will be treated as one Preprocessor AST node.
If a directive is used with an unsupported keyword its will be processed as an untyped AST.
The preprocessor lines are stored as members of their associated scope they are parsed within. ( Global, Namespace, Class/Struct )
***Again (Its not standard): These ASTs will be considered members or entries of braced scope they reside within***
The preprocessor lines are stored as members of their associated scope they are parsed within ( Global, Namespace, Class/Struct ).
***Again: These ASTs will be considered members or entries of braced scope they reside within***
Any preprocessor definition abuse that changes the syntax of the core language is unsupported and will fail to parse if not kept within an execution scope (function body, or expression assignment).
Exceptions:
@ -85,7 +85,7 @@ Macros used within a file should be registered by the user before parsing. This
## Registering macros
While the registeration of macros in the meta-program's side for parsing can be considered tedius, its necessary for the parser to accurately resolve the macros intent in one pass and it provides in a sense hygenics in verifying that they are used as intended.
While the registeration of macros in the meta-program's side for parsing can be considered tedius, its necessary for the parser to accurately resolve the macros intent in one pass (and it provides some hygenics by verifying that they are used as intended).
The following can be used to register a macro:
@ -121,7 +121,7 @@ Additioonally tthe following flags may be set:
* `MF_Allow_As_Definition`: Will allow the macro be an acceptable token/s when the parser expects a declartion or definition to resolve after attributes or specifiers have been identified beforehand.
* This flag requires that the macro is of type `MT_Statement` to make any sense of usage.
If a macro is not define the following warning will be issued if `GEN_BUILD_DEBUG=1` during lexing within [lexer.cpp](../base/components/lexer.cpp) - `lex_preprocessor_define`:
If a macro is not defined the following warning will be issued if `GEN_BUILD_DEBUG=1` during lexing within [lexer.cpp](../base/components/lexer.cpp) - `lex_preprocessor_define`:
```c
log_fmt("Warning: '%S' was not registered before the lexer processed its #define directive, it will be registered as a expression macro\n"

View File

@ -1,6 +1,6 @@
// These macros are used in the swtich cases within parser.cpp
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIERS_CASES \
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_TOK_SPECIFIER_CASES \
case Tok_Spec_Consteval: \
case Tok_Spec_Constexpr: \
case Tok_Spec_Constinit: \
@ -14,7 +14,7 @@ case Tok_Spec_Static: \
case Tok_Spec_Volatile: \
case Tok_Spec_Virtual
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIERS_CASES \
#define GEN_PARSER_CLASS_STRUCT_BODY_ALLOWED_MEMBER_SPECIFIER_CASES \
case Spec_Constexpr: \
case Spec_Constinit: \
case Spec_Explicit: \
@ -54,12 +54,12 @@ case Spec_NeverInline: \
case Spec_Static: \
case Spec_Volatile
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_FRIEND_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Inline: \
case Spec_ForceInline
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_FUNCTION_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Consteval: \
case Spec_Constexpr: \
@ -71,7 +71,7 @@ case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_OPERATOR_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_ForceInline: \
@ -79,7 +79,7 @@ case Spec_Inline: \
case Spec_NeverInline: \
case Spec_Static
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIERS_CASES \
#define GEN_PARSER_TEMPLATE_ALLOWED_SPECIFIER_CASES \
case Spec_Const: \
case Spec_Constexpr: \
case Spec_Constinit: \