Updated AST_Types.md doc

This commit is contained in:
Edward R. Gonzalez 2023-11-22 15:03:24 -05:00
parent 91a3250d4c
commit 6b10cd2b3e
3 changed files with 186 additions and 164 deletions

View File

@ -21,7 +21,7 @@ Fields:
```cpp
Code Front;
Code Back;
Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -52,6 +52,7 @@ Fields:
StringCached Content;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -137,6 +138,7 @@ CodeParam Params;
Code Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
CodeT Type;
```
@ -165,6 +167,7 @@ Fields:
StringCached Content;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -186,6 +189,7 @@ CodeSpecifiers Specs;
Code Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
CodeT Type;
```
@ -214,6 +218,7 @@ CodeType UnderlyingType;
CodeBody Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -244,6 +249,7 @@ Fields:
StringCached Content;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -263,6 +269,7 @@ Fields:
CodeBody Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -286,6 +293,7 @@ StringCached Content;
Code Prev;
Code Next;
Code Parent;
parser::Token* Tok;
StringCached Name;
CodeT Type;
```
@ -307,6 +315,7 @@ CodeComment InlineCmt;
Code Declaration;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -330,8 +339,9 @@ CodeType ReturnType;
CodeParam Params;
CodeBody Body;
Code Prev;
Code Parent;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
ModuleFlag ModuleFlags;
@ -357,6 +367,7 @@ Fields:
```cpp
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -377,6 +388,7 @@ Fields:
CodeBody Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -405,6 +417,7 @@ CodeParam Params;
CodeBody Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -436,6 +449,7 @@ CodeType ValueType;
CodeBody Body;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -463,6 +477,7 @@ CodeType ValueType;
Code Value;
CodeParam Last;
CodeParam Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -483,6 +498,7 @@ Fields:
StringCached Content;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -502,6 +518,7 @@ Fields:
StringCached Content;
Code Prev;
Code Next;
paser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -519,8 +536,10 @@ Fields:
```cpp
SpecifierT ArrSpecs[ AST::ArrSpecs_Cap ];
CodeSpecifiers NextSpecs;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -542,6 +561,7 @@ CodeParam Params;
Code Declaration;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -570,6 +590,7 @@ CodeParam Params;
Code ArrExpr;
Code Prev;
Code Next;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -609,7 +630,8 @@ Serialization:
<ModuleFlags> typedef <UnderlyingType> <Name>; <InlineCmt>
// Functions
<ModuleFlags> typedef <Name>; <InlineCmt>
<ModuleFlags> typedef <ReturnType> <Name>( <Parameters> ); <InlineCmt>
<ModuleFlags> typedef <ReturnType> ( <Expression that yeilds an Identifier signature> )( <Parameters> ); <InlineCmt>
```
## Union

View File

@ -90,7 +90,7 @@ struct AST_Class
};
CodeType Prev;
CodeType Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -116,7 +116,7 @@ struct AST_Constructor
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
char _PAD_NAME_[ sizeof(StringCached) ];
CodeT Type;
@ -132,7 +132,7 @@ struct AST_Define
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -156,7 +156,7 @@ struct AST_Destructor
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
char _PAD_NAME_[ sizeof(StringCached) ];
CodeT Type;
@ -181,7 +181,7 @@ struct AST_Enum
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -198,7 +198,7 @@ struct AST_Exec
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -214,7 +214,7 @@ struct AST_Expr
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -229,7 +229,7 @@ struct AST_Expr_Assign
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -244,7 +244,7 @@ struct AST_Expr_Alignof
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -259,7 +259,7 @@ struct AST_Expr_Binary
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -274,7 +274,7 @@ struct AST_Expr_CStyleCast
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -289,7 +289,7 @@ struct AST_Expr_FunctionalCast
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -304,7 +304,7 @@ struct AST_Expr_CppCast
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -319,7 +319,7 @@ struct AST_Expr_ProcCall
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -334,7 +334,7 @@ struct AST_Expr_Decltype
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -349,7 +349,7 @@ struct AST_Expr_Comma
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -364,7 +364,7 @@ struct AST_Expr_AMS
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -379,7 +379,7 @@ struct AST_Expr_Sizeof
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -394,7 +394,7 @@ struct AST_Expr_Subscript
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -409,7 +409,7 @@ struct AST_Expr_Ternary
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -424,7 +424,7 @@ struct AST_Expr_UnaryPrefix
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -439,7 +439,7 @@ struct AST_Expr_UnaryPostfix
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -454,7 +454,7 @@ struct AST_Expr_Element
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -476,7 +476,7 @@ struct AST_Extern
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -492,7 +492,7 @@ struct AST_Include
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -514,7 +514,7 @@ struct AST_Friend
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -539,7 +539,7 @@ struct AST_Fn
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -553,7 +553,7 @@ struct AST_Module
char _PAD_[ sizeof(SpecifierT) * AST::ArrSpecs_Cap + sizeof(AST*) ];
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -574,7 +574,7 @@ struct AST_NS
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -600,7 +600,7 @@ struct AST_Operator
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -626,7 +626,7 @@ struct AST_OpCast
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -649,7 +649,7 @@ struct AST_Param
};
CodeParam Last;
CodeParam Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -666,7 +666,7 @@ struct AST_Pragma
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -682,7 +682,7 @@ struct AST_PreprocessCond
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -696,7 +696,7 @@ struct AST_Specifiers
CodeSpecifiers NextSpecs;
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -713,7 +713,7 @@ struct AST_Stmt
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -728,7 +728,7 @@ struct AST_Stmt_Break
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -743,7 +743,7 @@ struct AST_Stmt_Case
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -758,7 +758,7 @@ struct AST_Stmt_Continue
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -773,7 +773,7 @@ struct AST_Stmt_Decl
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -788,7 +788,7 @@ struct AST_Stmt_Do
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -803,7 +803,7 @@ struct AST_Stmt_Expr
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -818,7 +818,7 @@ struct AST_Stmt_Else
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -833,7 +833,7 @@ struct AST_Stmt_If
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -848,7 +848,7 @@ struct AST_Stmt_For
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -863,7 +863,7 @@ struct AST_Stmt_Goto
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -878,7 +878,7 @@ struct AST_Stmt_Label
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -893,7 +893,7 @@ struct AST_Stmt_Switch
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -908,7 +908,7 @@ struct AST_Stmt_While
}
CodeExpr Prev;
CodeExpr Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -934,7 +934,7 @@ struct AST_Struct
};
CodeType Prev;
CodeType Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -957,7 +957,7 @@ struct AST_Template
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -986,7 +986,7 @@ struct AST_Type
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -1013,7 +1013,7 @@ struct AST_Type
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;
@ -1036,7 +1036,7 @@ struct AST_Typedef
};
Code Prev;
Code Next;
parser::Token* Token;
parser::Token* Tok;
Code Parent;
StringCached Name;
CodeT Type;

View File

@ -166,16 +166,16 @@ namespace parser {
}
struct ParseInfo
{
Arena file_mem;
Arena token_mem;
Arena code_mem;
FileContents file_content;
Array<parser::Token> tokens;
Array<parser::Error> errors;
Arena FileMem;
Arena TokMem;
Arena CodeMem;
FileContents FileContent;
Array<parser::Token> Tokens;
Array<parser::Error> Errors;
// Errors are allocated to a dedicated general arena.
};
;
CodeBody parse_file( StrC path );
#endif