- Timestamp:
- Jul 12, 2018, 3:01:50 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 26ef3b2, 79caea8
- Parents:
- 0fc52b6
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r0fc52b6 r8f91c9ae 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 17:40:33201813 // Update Count : 60 412 // Last Modified On : Thu Jul 12 13:52:09 2018 13 // Update Count : 606 14 14 // 15 15 … … 76 76 aggregate.parent = nullptr; 77 77 aggregate.anon = false; 78 aggregate.inLine = false; 78 79 break; 79 80 case AggregateInst: … … 81 82 aggInst.aggregate = nullptr; 82 83 aggInst.params = nullptr; 83 aggInst.hoistType = false;; 84 aggInst.hoistType = false; 85 aggInst.inLine = false; 84 86 break; 85 87 case Symbolic: … … 219 221 newtype->aggregate.body = aggregate.body; 220 222 newtype->aggregate.anon = aggregate.anon; 223 newtype->aggregate.inLine = aggregate.inLine; 221 224 newtype->aggregate.tagged = aggregate.tagged; 222 225 newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr; … … 226 229 newtype->aggInst.params = maybeClone( aggInst.params ); 227 230 newtype->aggInst.hoistType = aggInst.hoistType; 231 newtype->aggInst.inLine = aggInst.inLine; 228 232 break; 229 233 case Enum: -
src/Parser/TypeData.h
r0fc52b6 r8f91c9ae 10 10 // Created On : Sat May 16 15:18:36 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 22 15:21:23201813 // Update Count : 19 112 // Last Modified On : Thu Jul 12 14:00:09 2018 13 // Update Count : 193 14 14 // 15 15 … … 37 37 bool body; 38 38 bool anon; 39 bool inLine; 39 40 40 41 bool tagged; … … 46 47 ExpressionNode * params; 47 48 bool hoistType; 49 bool inLine; 48 50 }; 49 51 … … 66 68 mutable DeclarationNode * oldDeclList; 67 69 StatementNode * body; 68 ExpressionNode * withExprs; 70 ExpressionNode * withExprs; // expressions from function's with_clause 69 71 }; 70 72 … … 128 130 TupleType * buildTuple( const TypeData * ); 129 131 TypeofType * buildTypeof( const TypeData * ); 130 Declaration * buildDecl( const TypeData *, const std::string &, Type::StorageClasses, Expression *, Type::FuncSpecifiers funcSpec, LinkageSpec::Spec, Expression * asmName, Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute * >() ); 132 Declaration * buildDecl( const TypeData *, const std::string &, Type::StorageClasses, Expression *, Type::FuncSpecifiers funcSpec, LinkageSpec::Spec, Expression * asmName, 133 Initializer * init = nullptr, std::list< class Attribute * > attributes = std::list< class Attribute * >() ); 131 134 FunctionType * buildFunction( const TypeData * ); 132 135 void buildKRFunction( const TypeData::Function_t & function ); -
src/Parser/parser.yy
r0fc52b6 r8f91c9ae 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 11 11:55:24 201813 // Update Count : 37 3912 // Last Modified On : Thu Jul 12 13:47:44 2018 13 // Update Count : 3755 14 14 // 15 15 … … 1936 1936 | EXTENSION type_specifier field_declaring_list ';' // GCC 1937 1937 { distExt( $3 ); $$ = distAttr( $2, $3 ); } // mark all fields in list 1938 | INLINE type_specifier field_declaring_list ';' // CFA 1939 { 1940 if ( $2->type && ( $2->type->kind == TypeData::Aggregate || $2->type->kind == TypeData::AggregateInst ) ) { 1941 if ( $2->type->kind == TypeData::Aggregate ) { 1942 $2->type->aggregate.inLine = true; 1943 } else { 1944 $2->type->aggInst.inLine = true; 1945 } // if 1946 $$ = distAttr( $2, $3 ); 1947 } else { 1948 SemanticError( yylloc, "inline qualifier only allowed for aggregate field declarations." ); $$ = nullptr; 1949 } // if 1950 } 1938 1951 | typedef_declaration ';' // CFA 1939 1952 | cfa_field_declaring_list ';' // CFA, new style field declaration
Note: See TracChangeset
for help on using the changeset viewer.