ast_types.md: Formatting, Updates to AST_Design.md & AST_Types.md

This commit is contained in:
Edward R. Gonzalez 2024-12-16 12:26:17 -05:00
parent 8952cf5f1b
commit 15847f10b9
4 changed files with 368 additions and 347 deletions

View File

@ -29,16 +29,16 @@
struct AST_Body struct AST_Body
{ {
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
Code Front; Code Front;
Code Back; Code Back;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
s32 NumEntries; s32 NumEntries;
}; };
static_assert( sizeof(AST_Body) == sizeof(AST), "ERROR: AST_Body is not the same size as AST"); static_assert( sizeof(AST_Body) == sizeof(AST), "ERROR: AST_Body is not the same size as AST");
@ -47,7 +47,7 @@ struct AST_Attributes
{ {
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
@ -65,7 +65,7 @@ struct AST_BaseClass
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -82,7 +82,7 @@ struct AST_Comment
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -100,14 +100,14 @@ struct AST_Class
{ {
CodeComment InlineCmt; // Only supported by forward declarations CodeComment InlineCmt; // Only supported by forward declarations
CodeAttributes Attributes; CodeAttributes Attributes;
char _PAD_SPECS_ [ sizeof(AST*) ]; char _PAD_SPECS_ [ sizeof(AST*) ];
CodeTypename ParentType; CodeTypename ParentType;
char _PAD_PARAMS_[ sizeof(AST*) ]; char _PAD_PARAMS_[ sizeof(AST*) ];
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
CodeTypename Prev; CodeTypename Prev;
CodeTypename Next; CodeTypename Next;
Token* Tok; Token* Tok;
@ -130,10 +130,10 @@ struct AST_Constructor
Code InitializerList; Code InitializerList;
CodeParams Params; CodeParams Params;
Code Body; Code Body;
char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 2 ]; char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 2 ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -155,13 +155,13 @@ struct AST_Define
char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 1 ]; char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 1 ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_Define) == sizeof(AST), "ERROR: AST_Define is not the same size as AST"); static_assert( sizeof(AST_Define) == sizeof(AST), "ERROR: AST_Define is not the same size as AST");
@ -176,7 +176,7 @@ struct AST_DefineParams
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
s32 NumEntries; s32 NumEntries;
}; };
static_assert( sizeof(AST_DefineParams) == sizeof(AST), "ERROR: AST_DefineParams is not the same size as AST"); static_assert( sizeof(AST_DefineParams) == sizeof(AST), "ERROR: AST_DefineParams is not the same size as AST");
@ -192,10 +192,10 @@ struct AST_Destructor
CodeSpecifiers Specs; CodeSpecifiers Specs;
char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 2 ]; char _PAD_PROPERTIES_2_ [ sizeof(AST*) * 2 ];
Code Body; Code Body;
char _PAD_PROPERTIES_3_ [ sizeof(AST*) ]; char _PAD_PROPERTIES_3_ [ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -217,10 +217,10 @@ struct AST_Enum
CodeTypename UnderlyingType; CodeTypename UnderlyingType;
Code UnderlyingTypeMacro; Code UnderlyingTypeMacro;
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -237,7 +237,7 @@ struct AST_Exec
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
@ -515,13 +515,13 @@ struct AST_Extern
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_Extern) == sizeof(AST), "ERROR: AST_Extern is not the same size as AST"); static_assert( sizeof(AST_Extern) == sizeof(AST), "ERROR: AST_Extern is not the same size as AST");
@ -531,13 +531,13 @@ struct AST_Include
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_Include) == sizeof(AST), "ERROR: AST_Include is not the same size as AST"); static_assert( sizeof(AST_Include) == sizeof(AST), "ERROR: AST_Include is not the same size as AST");
@ -550,16 +550,16 @@ struct AST_Friend
CodeComment InlineCmt; CodeComment InlineCmt;
char _PAD_PROPERTIES_[ sizeof(AST*) * 4 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 4 ];
Code Declaration; Code Declaration;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_Friend) == sizeof(AST), "ERROR: AST_Friend is not the same size as AST"); static_assert( sizeof(AST_Friend) == sizeof(AST), "ERROR: AST_Friend is not the same size as AST");
@ -573,19 +573,19 @@ struct AST_Fn
CodeAttributes Attributes; CodeAttributes Attributes;
CodeSpecifiers Specs; CodeSpecifiers Specs;
CodeTypename ReturnType; CodeTypename ReturnType;
CodeParams Params; CodeParams Params;
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_ [ sizeof(AST*) ]; char _PAD_PROPERTIES_ [ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_Fn) == sizeof(AST), "ERROR: AST_Fn is not the same size as AST"); static_assert( sizeof(AST_Fn) == sizeof(AST), "ERROR: AST_Fn is not the same size as AST");
@ -594,14 +594,14 @@ struct AST_Module
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_Module) == sizeof(AST), "ERROR: AST_Module is not the same size as AST"); static_assert( sizeof(AST_Module) == sizeof(AST), "ERROR: AST_Module is not the same size as AST");
@ -610,45 +610,45 @@ struct AST_NS
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
struct { struct {
char _PAD_PROPERTIES_[ sizeof(AST*) * 5 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 5 ];
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_NS) == sizeof(AST), "ERROR: AST_NS is not the same size as AST"); static_assert( sizeof(AST_NS) == sizeof(AST), "ERROR: AST_NS is not the same size as AST");
struct AST_Operator struct AST_Operator
{ {
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
struct struct
{ {
CodeComment InlineCmt; CodeComment InlineCmt;
CodeAttributes Attributes; CodeAttributes Attributes;
CodeSpecifiers Specs; CodeSpecifiers Specs;
CodeTypename ReturnType; CodeTypename ReturnType;
CodeParams Params; CodeParams Params;
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_ [ sizeof(AST*) ]; char _PAD_PROPERTIES_ [ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
Operator Op; Operator Op;
}; };
static_assert( sizeof(AST_Operator) == sizeof(AST), "ERROR: AST_Operator is not the same size as AST"); static_assert( sizeof(AST_Operator) == sizeof(AST), "ERROR: AST_Operator is not the same size as AST");
@ -658,22 +658,22 @@ struct AST_OpCast
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
struct struct
{ {
CodeComment InlineCmt; CodeComment InlineCmt;
char _PAD_PROPERTIES_[ sizeof(AST*) ]; char _PAD_PROPERTIES_[ sizeof(AST*) ];
CodeSpecifiers Specs; CodeSpecifiers Specs;
CodeTypename ValueType; CodeTypename ValueType;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_3_[ sizeof(AST*) ]; char _PAD_PROPERTIES_3_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_OpCast) == sizeof(AST), "ERROR: AST_OpCast is not the same size as AST"); static_assert( sizeof(AST_OpCast) == sizeof(AST), "ERROR: AST_OpCast is not the same size as AST");
@ -684,7 +684,7 @@ struct AST_Params
struct struct
{ {
// TODO(Ed): Support attributes for parameters (Some prefix macros can be converted to that...) // TODO(Ed): Support attributes for parameters (Some prefix macros can be converted to that...)
char _PAD_PROPERTIES_2_[ sizeof(AST*) * 3 ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) * 3 ];
CodeTypename ValueType; CodeTypename ValueType;
Code Macro; Code Macro;
Code Value; Code Value;
@ -692,14 +692,14 @@ struct AST_Params
// char _PAD_PROPERTIES_3_[sizeof( AST* )]; // char _PAD_PROPERTIES_3_[sizeof( AST* )];
}; };
}; };
StrCached Name; StrCached Name;
CodeParams Last; CodeParams Last;
CodeParams Next; CodeParams Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
s32 NumEntries; s32 NumEntries;
}; };
static_assert( sizeof(AST_Params) == sizeof(AST), "ERROR: AST_Params is not the same size as AST"); static_assert( sizeof(AST_Params) == sizeof(AST), "ERROR: AST_Params is not the same size as AST");
@ -709,13 +709,13 @@ struct AST_Pragma
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_Pragma) == sizeof(AST), "ERROR: AST_Pragma is not the same size as AST"); static_assert( sizeof(AST_Pragma) == sizeof(AST), "ERROR: AST_Pragma is not the same size as AST");
@ -723,30 +723,30 @@ struct AST_PreprocessCond
{ {
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
StrCached Content; StrCached Content;
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) + sizeof(u32) ];
}; };
static_assert( sizeof(AST_PreprocessCond) == sizeof(AST), "ERROR: AST_PreprocessCond is not the same size as AST"); static_assert( sizeof(AST_PreprocessCond) == sizeof(AST), "ERROR: AST_PreprocessCond is not the same size as AST");
struct AST_Specifiers struct AST_Specifiers
{ {
Specifier ArrSpecs[ AST_ArrSpecs_Cap ]; Specifier ArrSpecs[ AST_ArrSpecs_Cap ];
StrCached Name; StrCached Name;
CodeSpecifiers NextSpecs; CodeSpecifiers NextSpecs;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
s32 NumEntries; s32 NumEntries;
}; };
static_assert( sizeof(AST_Specifiers) == sizeof(AST), "ERROR: AST_Specifier is not the same size as AST"); static_assert( sizeof(AST_Specifiers) == sizeof(AST), "ERROR: AST_Specifier is not the same size as AST");
@ -756,7 +756,7 @@ struct AST_Stmt
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -771,7 +771,7 @@ struct AST_Stmt_Break
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -786,7 +786,7 @@ struct AST_Stmt_Case
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -801,7 +801,7 @@ struct AST_Stmt_Continue
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -816,7 +816,7 @@ struct AST_Stmt_Decl
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -831,7 +831,7 @@ struct AST_Stmt_Do
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -846,7 +846,7 @@ struct AST_Stmt_Expr
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -861,7 +861,7 @@ struct AST_Stmt_Else
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -876,7 +876,7 @@ struct AST_Stmt_If
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -891,7 +891,7 @@ struct AST_Stmt_For
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -906,7 +906,7 @@ struct AST_Stmt_Goto
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -921,7 +921,7 @@ struct AST_Stmt_Label
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -936,7 +936,7 @@ struct AST_Stmt_Switch
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -951,7 +951,7 @@ struct AST_Stmt_While
union { union {
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
}; };
StrCached Name; StrCached Name;
CodeExpr Prev; CodeExpr Prev;
CodeExpr Next; CodeExpr Next;
Token* Tok; Token* Tok;
@ -970,14 +970,14 @@ struct AST_Struct
{ {
CodeComment InlineCmt; CodeComment InlineCmt;
CodeAttributes Attributes; CodeAttributes Attributes;
char _PAD_SPECS_ [ sizeof(AST*) ]; char _PAD_SPECS_ [ sizeof(AST*) ];
CodeTypename ParentType; CodeTypename ParentType;
char _PAD_PARAMS_[ sizeof(AST*) ]; char _PAD_PARAMS_[ sizeof(AST*) ];
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
CodeTypename Prev; CodeTypename Prev;
CodeTypename Next; CodeTypename Next;
Token* Tok; Token* Tok;
@ -994,20 +994,20 @@ struct AST_Template
char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ]; char _PAD_[ sizeof(Specifier) * AST_ArrSpecs_Cap + sizeof(AST*) ];
struct struct
{ {
char _PAD_PROPERTIES_[ sizeof(AST*) * 4 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 4 ];
CodeParams Params; CodeParams Params;
Code Declaration; Code Declaration;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_Template) == sizeof(AST), "ERROR: AST_Template is not the same size as AST"); static_assert( sizeof(AST_Template) == sizeof(AST), "ERROR: AST_Template is not the same size as AST");
@ -1029,13 +1029,13 @@ struct AST_Type
// CodeSpecifiers SpecsFuncSuffix; // Only used for function signatures // CodeSpecifiers SpecsFuncSuffix; // Only used for function signatures
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
b32 IsParamPack; b32 IsParamPack;
}; };
static_assert( sizeof(AST_Type) == sizeof(AST), "ERROR: AST_Type is not the same size as AST"); static_assert( sizeof(AST_Type) == sizeof(AST), "ERROR: AST_Type is not the same size as AST");
@ -1062,7 +1062,7 @@ struct AST_Typename
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
char _PAD_UNUSED_[ sizeof(ModuleFlag) ]; char _PAD_UNUSED_[ sizeof(ModuleFlag) ];
struct { struct {
b16 IsParamPack; // Used by typename to know if type should be considered a parameter pack. b16 IsParamPack; // Used by typename to know if type should be considered a parameter pack.
ETypenameTag TypeTag; // Used by typename to keep track of explicitly declared tags for the identifier (enum, struct, union) ETypenameTag TypeTag; // Used by typename to keep track of explicitly declared tags for the identifier (enum, struct, union)
@ -1077,9 +1077,9 @@ struct AST_Typedef
struct struct
{ {
CodeComment InlineCmt; CodeComment InlineCmt;
char _PAD_PROPERTIES_[ sizeof(AST*) * 2 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 2 ];
Code UnderlyingType; Code UnderlyingType;
char _PAD_PROPERTIES_2_[ sizeof(AST*) * 3 ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) * 3 ];
}; };
}; };
StrCached Name; StrCached Name;
@ -1101,19 +1101,19 @@ struct AST_Union
{ {
char _PAD_INLINE_CMT_[ sizeof(AST*) ]; char _PAD_INLINE_CMT_[ sizeof(AST*) ];
CodeAttributes Attributes; CodeAttributes Attributes;
char _PAD_PROPERTIES_[ sizeof(AST*) * 3 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 3 ];
CodeBody Body; CodeBody Body;
char _PAD_PROPERTIES_2_[ sizeof(AST*) ]; char _PAD_PROPERTIES_2_[ sizeof(AST*) ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_Union) == sizeof(AST), "ERROR: AST_Union is not the same size as AST"); static_assert( sizeof(AST_Union) == sizeof(AST), "ERROR: AST_Union is not the same size as AST");
@ -1125,19 +1125,19 @@ struct AST_Using
{ {
CodeComment InlineCmt; CodeComment InlineCmt;
CodeAttributes Attributes; CodeAttributes Attributes;
char _PAD_SPECS_ [ sizeof(AST*) ]; char _PAD_SPECS_ [ sizeof(AST*) ];
CodeTypename UnderlyingType; CodeTypename UnderlyingType;
char _PAD_PROPERTIES_[ sizeof(AST*) * 3 ]; char _PAD_PROPERTIES_[ sizeof(AST*) * 3 ];
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
char _PAD_UNUSED_[ sizeof(u32) ]; char _PAD_UNUSED_[ sizeof(u32) ];
}; };
static_assert( sizeof(AST_Using) == sizeof(AST), "ERROR: AST_Using is not the same size as AST"); static_assert( sizeof(AST_Using) == sizeof(AST), "ERROR: AST_Using is not the same size as AST");
@ -1153,17 +1153,17 @@ struct AST_Var
CodeTypename ValueType; CodeTypename ValueType;
Code BitfieldSize; Code BitfieldSize;
Code Value; Code Value;
CodeVar NextVar; CodeVar NextVar;
}; };
}; };
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeType Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
s32 VarParenthesizedInit; s32 VarParenthesizedInit;
}; };
static_assert( sizeof(AST_Var) == sizeof(AST), "ERROR: AST_Var is not the same size as AST"); static_assert( sizeof(AST_Var) == sizeof(AST), "ERROR: AST_Var is not the same size as AST");

View File

@ -53,6 +53,7 @@ StrBuilder <prefix>_to_strbuilder(Code code);
Where the first generates strings allocated using Allocator_StringArena and the other appends an existing strings with their backed allocator. Where the first generates strings allocated using Allocator_StringArena and the other appends an existing strings with their backed allocator.
Serialization of for the AST is defined for `Code` in [`ast.chpp`](../base/components/ast.cpp) with `code_to_strbuilder_ptr` & `code_to_strbuilder`. Serialization of for the AST is defined for `Code` in [`ast.cpp`](../base/components/ast.cpp) with `code_to_strbuilder_ptr` & `code_to_strbuilder`.
Serializtion for the rest of the code types is within [`code_serialization.cpp`](../base/components/code_serialization.cpp). Serializtion for the rest of the code types is within [`code_serialization.cpp`](../base/components/code_serialization.cpp).
Gencpp's serialization does not provide coherent formatting of the code. The user should use a formatter after serializing. Gencpp's serialization does not provide coherent formatting of the code. The user should use a formatter after serializing.

View File

@ -25,13 +25,13 @@ These are containers representing a scope body of a definition that can be of th
Fields: Fields:
```cpp ```cpp
StrCached Name; StrCached Name;
Code Front; Code Front;
Code Back; Code Back;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
s32 NumEntries; s32 NumEntries;
``` ```
The `Front` member represents the start of the link list and `Back` the end. The `Front` member represents the start of the link list and `Back` the end.
@ -56,13 +56,13 @@ Represent standard or vendor specific C/C++ attributes.
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -80,13 +80,13 @@ Stores a comment.
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -109,12 +109,12 @@ CodeComment InlineCmt; // Only supported by forward declarations
CodeAttributes Attributes; CodeAttributes Attributes;
CodeType ParentType; CodeType ParentType;
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
CodeType Prev; CodeType Prev;
CodeType Next; CodeType Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
AccessSpec ParentAccess; AccessSpec ParentAccess;
``` ```
@ -139,16 +139,16 @@ You'll notice that only one parent type is supported only with parent access. Th
Fields: Fields:
```cpp ```cpp
CodeComment InlineCmt; // Only supported by forward declarations CodeComment InlineCmt; // Only supported by forward declarations
Code InitializerList; Code InitializerList;
CodeParams Params; CodeParams Params;
Code Body; Code Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -178,13 +178,14 @@ Represents a preprocessor define
Fields: Fields:
```cpp ```cpp
StrCached Content; CodeDefineParams Params;
StrCached Name; Code Body;
Code Prev; StrCached Name;
Code Next; Code Prev;
Token* Tok; Code Next;
Code Parent; Token* Tok;
CodeT Type; Code Parent;
CodeType Type;
``` ```
Serialization: Serialization:
@ -193,6 +194,28 @@ Serialization:
#define <Name> <Content> #define <Name> <Content>
``` ```
## DefineParams
Preprocessor define's parameters.
Fields:
```cpp
StrCached Name;
Code Last;
Code Next;
Token* Tok;
Code Parent;
CodeType Type;
s32 NumEntries;
```
Serialization:
```cpp
<Name>, <Next> ...
```
## Destructor ## Destructor
Fields: Fields:
@ -201,12 +224,12 @@ Fields:
CodeComment InlineCmt; CodeComment InlineCmt;
CodeSpecifiers Specs; CodeSpecifiers Specs;
Code Body; Code Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -242,8 +265,8 @@ Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
StrCached Name; StrCached Name;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
@ -271,13 +294,13 @@ Will be obsolute when function body parsing is implemented.
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -286,18 +309,18 @@ Serialization:
<Content> <Content>
``` ```
## External Linkage ## External Linkage (Extern)
Fields: Fields:
```cpp ```cpp
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -314,13 +337,13 @@ extern "<Name>"
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Code Parent; Code Parent;
Token* Tok; Token* Tok;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -336,14 +359,14 @@ This library (until its necessary become some third-party library to do otherwis
Fields: Fields:
```cpp ```cpp
CodeComment InlineCmt; CodeComment InlineCmt;
Code Declaration; Code Declaration;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -363,12 +386,12 @@ CodeSpecifiers Specs;
CodeType ReturnType; CodeType ReturnType;
CodeParams Params; CodeParams Params;
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
@ -390,13 +413,13 @@ Serialization:
Fields: Fields:
```cpp ```cpp
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
Serialization: Serialization:
@ -410,14 +433,14 @@ Serialization:
Fields: Fields:
```cpp ```cpp
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
Serialization: Serialization:
@ -440,12 +463,12 @@ CodeSpecifiers Specs;
CodeType ReturnType; CodeType ReturnType;
CodeParams Params; CodeParams Params;
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
OperatorT Op; OperatorT Op;
``` ```
@ -472,12 +495,12 @@ CodeComment InlineCmt;
CodeSpecifiers Specs; CodeSpecifiers Specs;
CodeType ValueType; CodeType ValueType;
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -498,17 +521,17 @@ Serialization:
Fields: Fields:
```cpp ```cpp
CodeType ValueType; CodeType ValueType;
Code Macro; Code Macro;
Code Value; Code Value;
Code PostNameMacro; Code PostNameMacro;
StrCached Name; StrCached Name;
CodeParams Last; CodeParams Last;
CodeParams Next; CodeParams Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
s32 NumEntries; s32 NumEntries;
``` ```
Serialization: Serialization:
@ -524,13 +547,13 @@ Serialization:
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -544,13 +567,13 @@ Serialization:
Fields: Fields:
```cpp ```cpp
StrCached Content; StrCached Content;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
``` ```
Serialization: Serialization:
@ -566,12 +589,12 @@ Fields:
```cpp ```cpp
SpecifierT ArrSpecs[ AST_ArrSpecs_Cap ]; SpecifierT ArrSpecs[ AST_ArrSpecs_Cap ];
CodeSpecifiers NextSpecs; CodeSpecifiers NextSpecs;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
s32 NumEntries; s32 NumEntries;
``` ```
@ -586,15 +609,15 @@ Serialization:
Fields: Fields:
```cpp ```cpp
CodeParams Params; CodeParams Params;
Code Declaration; Code Declaration;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
Serialization: Serialization:
@ -621,8 +644,8 @@ Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
StrCached Name; StrCached Name;
CodeT Type; CodeType Type;
b32 IsParamPack; b32 IsParamPack;
ETypenameTag TypeTag; ETypenameTag TypeTag;
``` ```
@ -647,16 +670,16 @@ Those (macros) don't use the underlying type field as everything was serialized
Fields: Fields:
```cpp ```cpp
CodeComment InlineCmt; CodeComment InlineCmt;
Code UnderlyingType; Code UnderlyingType;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok Token* Tok
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
b32 IsFunction; b32 IsFunction;
``` ```
Serialization: Serialization:
@ -682,12 +705,12 @@ Fields:
```cpp ```cpp
CodeAttributes Attributes; CodeAttributes Attributes;
CodeBody Body; CodeBody Body;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
@ -708,12 +731,12 @@ Fields:
CodeComment InlineCmt; CodeComment InlineCmt;
CodeAttributes Attributes; CodeAttributes Attributes;
CodeType UnderlyingType; CodeType UnderlyingType;
StrCached Name; StrCached Name;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
``` ```
@ -740,13 +763,13 @@ CodeSpecifiers Specs;
CodeType ValueType; CodeType ValueType;
Code BitfieldSize; Code BitfieldSize;
Code Value; Code Value;
StrCached Name; StrCached Name;
CodeVar NextVar; CodeVar NextVar;
Code Prev; Code Prev;
Code Next; Code Next;
Token* Tok; Token* Tok;
Code Parent; Code Parent;
CodeT Type; CodeType Type;
ModuleFlag ModuleFlags; ModuleFlag ModuleFlags;
s32 VarParenthesizedInit; s32 VarParenthesizedInit;
``` ```

View File

@ -85,7 +85,7 @@ https://github.com/Ed94/gencpp/blob/967a044637f1615c709cb723dc61118fcc08dcdb/bas
*`OperatorT` is a typedef for `EOperator::Type` which has an underlying type of `u32`* *`OperatorT` is a typedef for `EOperator::Type` which has an underlying type of `u32`*
*`StrBuilder` is the dynamically allocating string builder type for the library* *`StrBuilder` is the dynamically allocating string builder type for the library*
AST widths are setup to be AST_POD_Size. AST widths are setup to be AST_POD_Size (128 bytes by default).
The width dictates how much the static array can hold before it must give way to using an allocated array: The width dictates how much the static array can hold before it must give way to using an allocated array:
```cpp ```cpp
@ -104,9 +104,6 @@ int AST_ArrSpecs_Cap =
) )
/ sizeof(Specifier) - 1; / sizeof(Specifier) - 1;
``` ```
*Ex: If the AST_POD_Size is 128 the capacity of the static array is 20.*
Data Notes: Data Notes:
* ASTs are wrapped for the user in a Code struct which is a wrapper for a AST* type. * ASTs are wrapped for the user in a Code struct which is a wrapper for a AST* type.