Changeset d5a52cc for src/Parser/parser.yy
- Timestamp:
- Nov 28, 2017, 3:04:37 PM (7 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 4e7a4e6
- Parents:
- 1393df07 (diff), 8a0a64d9 (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/parser.yy
r1393df07 rd5a52cc 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Nov 26 11:36:36201713 // Update Count : 29 6912 // Last Modified On : Mon Nov 27 17:23:35 2017 13 // Update Count : 2992 14 14 // 15 15 … … 1364 1364 $$ = $3->addQualifiers( $1 )->addQualifiers( $2 ); 1365 1365 } 1366 | cfa_function_declaration pop ',' push identifier_or_type_name 1367 { 1368 typedefTable.addToEnclosingScope( *$5, TypedefTable::ID ); 1369 $$ = $1->appendList( $1->cloneType( $5 ) ); 1366 | cfa_function_declaration pop ',' push identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')' 1367 { 1368 // Append the return type at the start (left-hand-side) to each identifier in the list. 1369 DeclarationNode * ret = new DeclarationNode; 1370 ret->type = maybeClone( $1->type->base ); 1371 $$ = $1->appendList( DeclarationNode::newFunction( $5, ret, $8, nullptr, true ) ); 1370 1372 } 1371 1373 ; … … 2416 2418 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2417 2419 typedefTable.leaveScope(); 2418 $$ = $1->addFunctionBody( $3 ); 2420 // Add the function body to the last identifier in the function definition list, i.e., foo3: 2421 // [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; } 2422 $1->get_last()->addFunctionBody( $3 ); 2423 $$ = $1; 2419 2424 } 2420 2425 | declaration_specifier function_declarator with_clause_opt compound_statement
Note: See TracChangeset
for help on using the changeset viewer.