Changeset d63eeb0 for src/Parser/TypeData.h
- Timestamp:
- Feb 9, 2016, 3:25:05 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7528ba1
- Parents:
- 771b3c3 (diff), bd85400 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.h
r771b3c3 rd63eeb0 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 26 23:39:03 201513 // Update Count : 1 612 // Last Modified On : Thu Jan 14 23:31:15 2016 13 // Update Count : 17 14 14 // 15 15 … … 29 29 ~TypeData(); 30 30 void print( std::ostream &, int indent = 0 ) const; 31 TypeData * clone() const;31 TypeData * clone() const; 32 32 33 Type * build() const;34 FunctionType * buildFunction() const;33 Type * build() const; 34 FunctionType * buildFunction() const; 35 35 36 TypeData * base;36 TypeData * base; 37 37 std::list< DeclarationNode::Qualifier > qualifiers; 38 DeclarationNode * forall;38 DeclarationNode * forall; 39 39 40 40 struct Basic_t { … … 46 46 DeclarationNode::Aggregate kind; 47 47 std::string name; 48 DeclarationNode * params;49 ExpressionNode * actuals; // holds actual parameters later applied to AggInst50 DeclarationNode * fields;48 DeclarationNode * params; 49 ExpressionNode * actuals; // holds actual parameters later applied to AggInst 50 DeclarationNode * fields; 51 51 }; 52 52 53 53 struct AggInst_t { 54 TypeData * aggregate;55 ExpressionNode * params;54 TypeData * aggregate; 55 ExpressionNode * params; 56 56 }; 57 57 58 58 struct Array_t { 59 ExpressionNode * dimension;59 ExpressionNode * dimension; 60 60 bool isVarLen; 61 61 bool isStatic; … … 64 64 struct Enumeration_t { 65 65 std::string name; 66 DeclarationNode * constants;66 DeclarationNode * constants; 67 67 }; 68 68 69 69 struct Function_t { 70 DeclarationNode * params;71 DeclarationNode * idList; // old-style72 DeclarationNode * oldDeclList;73 StatementNode * body;70 DeclarationNode * params; 71 DeclarationNode * idList; // old-style 72 DeclarationNode * oldDeclList; 73 StatementNode * body; 74 74 bool hasBody; 75 75 bool newStyle; … … 79 79 std::string name; 80 80 bool isTypedef; // false => TYPEGENname, true => TYPEDEFname 81 DeclarationNode * params;82 ExpressionNode * actuals;83 DeclarationNode * assertions;81 DeclarationNode * params; 82 ExpressionNode * actuals; 83 DeclarationNode * assertions; 84 84 }; 85 85 … … 87 87 DeclarationNode::TypeClass tyClass; 88 88 std::string name; 89 DeclarationNode * assertions;89 DeclarationNode * assertions; 90 90 }; 91 91 92 92 struct Tuple_t { 93 DeclarationNode * members;93 DeclarationNode * members; 94 94 }; 95 95 96 96 struct Typeof_t { 97 ExpressionNode * expr;97 ExpressionNode * expr; 98 98 }; 99 99 100 100 struct Attr_t { 101 101 std::string name; 102 ExpressionNode * expr;103 DeclarationNode * type;102 ExpressionNode * expr; 103 DeclarationNode * type; 104 104 }; 105 105 106 106 union { 107 Basic_t * basic;108 Aggregate_t * aggregate;109 AggInst_t * aggInst;110 Array_t * array;111 Enumeration_t * enumeration;112 Function_t * function;113 Symbolic_t * symbolic;114 Variable_t * variable;115 Tuple_t * tuple;116 Typeof_t * typeexpr;117 Attr_t * attr;107 Basic_t * basic; 108 Aggregate_t * aggregate; 109 AggInst_t * aggInst; 110 Array_t * array; 111 Enumeration_t * enumeration; 112 Function_t * function; 113 Symbolic_t * symbolic; 114 Variable_t * variable; 115 Tuple_t * tuple; 116 Typeof_t * typeexpr; 117 Attr_t * attr; 118 118 }; 119 119 120 TypeData * extractAggregate( bool toplevel = true ) const;120 TypeData * extractAggregate( bool toplevel = true ) const; 121 121 // helper function for DeclNodeImpl::build 122 Declaration * buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Type linkage, Initializer *init = 0 ) const;122 Declaration * buildDecl( std::string name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Type linkage, Initializer * init = 0 ) const; 123 123 // helper functions for build() 124 124 Type::Qualifiers buildQualifiers() const;
Note:
See TracChangeset
for help on using the changeset viewer.