Added support for inline comments

Also now doing comment serialization on def_comment directly as parse_comment doesn't need it.

Essentially comment ast types serialize the same way s untyped and execution ASTs
This commit is contained in:
2023-08-23 00:05:58 -04:00
parent 5e79e8ba65
commit c97762ac16
14 changed files with 344 additions and 103 deletions

View File

@ -226,10 +226,11 @@ struct AST
union {
struct
{
AST* InlineCmt; // Class, Constructor, Destructor, Enum, Friend, Functon, Operator, OpCast, Struct, Typedef, Using, Variable
AST* Attributes; // Class, Enum, Function, Struct, Typedef, Union, Using, Variable
AST* Specs; // Function, Operator, Type symbol, Variable
AST* Specs; // Destructor, Function, Operator, Type symbol, Variable
union {
AST* InitializerList; // Constructor, Destructor
AST* InitializerList; // Constructor
AST* ParentType; // Class, Struct
AST* ReturnType; // Function, Operator
AST* UnderlyingType; // Enum, Typedef
@ -237,7 +238,7 @@ struct AST
};
union {
AST* BitfieldSize; // Varaiable (Class/Struct Data Member)
AST* Params; // Function, Operator, Template
AST* Params; // Constructor, Function, Operator, Template
};
union {
AST* ArrExpr; // Type Symbol
@ -275,10 +276,11 @@ struct AST_POD
union {
struct
{
AST* InlineCmt; // Class, Constructor, Destructor, Enum, Friend, Functon, Operator, OpCast, Struct, Typedef, Using, Variable
AST* Attributes; // Class, Enum, Function, Struct, Typename, Union, Using, Variable
AST* Specs; // Function, Operator, Type symbol, Variable
union {
AST* InitializerList; // Constructor, Destructor
AST* InitializerList; // Constructor
AST* ParentType; // Class, Struct
AST* ReturnType; // Function, Operator
AST* UnderlyingType; // Enum, Typedef