Changeset bb7422a for src/Parser/TypeData.h
- Timestamp:
- Apr 4, 2023, 2:25:52 PM (19 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- beeff61e, e02e13f
- Parents:
- 4541b09
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.h
r4541b09 rbb7422a 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat May 16 15:18:36 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Feb 24 14:25:02202313 // Update Count : 20 511 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Mar 1 10:44:00 2023 13 // Update Count : 206 14 14 // 15 15 … … 20 20 #include <string> // for string 21 21 22 #include "AST/Type.hpp" // for Type 22 23 #include "ParseNode.h" // for DeclarationNode, DeclarationNode::Ag... 23 #include "SynTree/LinkageSpec.h" // for Spec24 #include "SynTree/Type.h" // for Type, ReferenceToType (ptr only)25 #include "SynTree/SynTree.h" // for Visitor Nodes26 24 27 25 struct TypeData { … … 30 28 31 29 struct Aggregate_t { 32 AggregateDecl::Aggregate kind;30 ast::AggregateDecl::Aggregate kind; 33 31 const std::string * name = nullptr; 34 32 DeclarationNode * params = nullptr; … … 41 39 }; 42 40 43 struct AggInst_t { // handles SUE41 struct AggInst_t { 44 42 TypeData * aggregate = nullptr; 45 43 ExpressionNode * params = nullptr; … … 93 91 DeclarationNode::BuiltinType builtintype = DeclarationNode::NoBuiltinType; 94 92 95 Type::Qualifiers qualifiers;93 ast::CV::Qualifiers qualifiers; 96 94 DeclarationNode * forall = nullptr; 97 95 … … 114 112 }; 115 113 116 Type * typebuild( const TypeData * );114 ast::Type * typebuild( const TypeData * ); 117 115 TypeData * typeextractAggregate( const TypeData * td, bool toplevel = true ); 118 Type::Qualifiers buildQualifiers( const TypeData * td );119 Type * buildBasicType( const TypeData * );120 PointerType * buildPointer( const TypeData * );121 ArrayType * buildArray( const TypeData * );122 ReferenceType * buildReference( const TypeData * );123 AggregateDecl * buildAggregate( const TypeData *, std::list< Attribute *> );124 ReferenceToType * buildComAggInst( const TypeData *, std::list< Attribute * > attributes, LinkageSpec::Spec linkage );125 ReferenceToType * buildAggInst( const TypeData * );126 TypeDecl * buildVariable( const TypeData * );127 EnumDecl * buildEnum( const TypeData *, std::list< Attribute * >, LinkageSpec::Spec );128 TypeInstType * buildSymbolicInst( const TypeData * );129 TupleType * buildTuple( const TypeData * );130 TypeofType * buildTypeof( const TypeData * );131 VTableType * buildVtable( const TypeData * );132 Declaration* buildDecl(133 const TypeData *, const std::string &, Type::StorageClasses, Expression*,134 Type::FuncSpecifiers funcSpec, LinkageSpec::Spec, Expression* asmName,135 Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute *>() );136 FunctionType * buildFunction( const TypeData * );137 Declaration* addEnumBase( Declaration *, const TypeData * );116 ast::CV::Qualifiers buildQualifiers( const TypeData * td ); 117 ast::Type * buildBasicType( const TypeData * ); 118 ast::PointerType * buildPointer( const TypeData * ); 119 ast::ArrayType * buildArray( const TypeData * ); 120 ast::ReferenceType * buildReference( const TypeData * ); 121 ast::AggregateDecl * buildAggregate( const TypeData *, std::vector<ast::ptr<ast::Attribute>> ); 122 ast::BaseInstType * buildComAggInst( const TypeData *, std::vector<ast::ptr<ast::Attribute>> && attributes, ast::Linkage::Spec linkage ); 123 ast::BaseInstType * buildAggInst( const TypeData * ); 124 ast::TypeDecl * buildVariable( const TypeData * ); 125 ast::EnumDecl * buildEnum( const TypeData *, std::vector<ast::ptr<ast::Attribute>> &&, ast::Linkage::Spec ); 126 ast::TypeInstType * buildSymbolicInst( const TypeData * ); 127 ast::TupleType * buildTuple( const TypeData * ); 128 ast::TypeofType * buildTypeof( const TypeData * ); 129 ast::VTableType * buildVtable( const TypeData * ); 130 ast::Decl * buildDecl( 131 const TypeData *, const std::string &, ast::Storage::Classes, ast::Expr *, 132 ast::Function::Specs funcSpec, ast::Linkage::Spec, ast::Expr * asmName, 133 ast::Init * init = nullptr, std::vector<ast::ptr<ast::Attribute>> && attributes = std::vector<ast::ptr<ast::Attribute>>() ); 134 ast::FunctionType * buildFunctionType( const TypeData * ); 135 ast::Decl * addEnumBase( Declaration *, const TypeData * ); 138 136 void buildKRFunction( const TypeData::Function_t & function ); 139 137
Note: See TracChangeset
for help on using the changeset viewer.