Changes in src/Parser/parser.yy [481115f:5fcba14]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r481115f r5fcba14 1058 1058 with_statement: 1059 1059 WITH '(' tuple_expression_list ')' statement 1060 { throw SemanticError("With clause is currently unimplemented."); $$ = nullptr; } // FIX ME 1060 { 1061 $$ = new StatementNode( build_with( $3, $5 ) ); 1062 } 1061 1063 ; 1062 1064 … … 2410 2412 { $$ = nullptr; } 2411 2413 | WITH '(' tuple_expression_list ')' 2412 { throw SemanticError("With clause is currently unimplemented."); $$ = nullptr; } // FIX ME2414 { $$ = new StatementNode( build_with( $3, nullptr ) ); } 2413 2415 ; 2414 2416 … … 2420 2422 // Add the function body to the last identifier in the function definition list, i.e., foo3: 2421 2423 // [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; } 2422 $1->get_last()->addFunctionBody( $3 );2424 $1->get_last()->addFunctionBody( $3, $2 ); 2423 2425 $$ = $1; 2424 2426 } … … 2428 2430 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2429 2431 typedefTable.leaveScope(); 2430 $$ = $2->addFunctionBody( $4 )->addType( $1 );2432 $$ = $2->addFunctionBody( $4, $3 )->addType( $1 ); 2431 2433 } 2432 2434 // handles default int return type, OBSOLESCENT (see 1) … … 2435 2437 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2436 2438 typedefTable.leaveScope(); 2437 $$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );2439 $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); 2438 2440 } 2439 2441 // handles default int return type, OBSOLESCENT (see 1) … … 2442 2444 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2443 2445 typedefTable.leaveScope(); 2444 $$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );2446 $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); 2445 2447 } 2446 2448 // handles default int return type, OBSOLESCENT (see 1) … … 2449 2451 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2450 2452 typedefTable.leaveScope(); 2451 $$ = $3->addFunctionBody( $5 )->addQualifiers( $2 )->addQualifiers( $1 );2453 $$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 ); 2452 2454 } 2453 2455 … … 2458 2460 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2459 2461 typedefTable.leaveScope(); 2460 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addType( $1 );2462 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addType( $1 ); 2461 2463 } 2462 2464 // handles default int return type, OBSOLESCENT (see 1) … … 2465 2467 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2466 2468 typedefTable.leaveScope(); 2467 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );2469 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); 2468 2470 } 2469 2471 // handles default int return type, OBSOLESCENT (see 1) … … 2472 2474 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2473 2475 typedefTable.leaveScope(); 2474 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );2476 $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); 2475 2477 } 2476 2478 // handles default int return type, OBSOLESCENT (see 1) … … 2479 2481 typedefTable.addToEnclosingScope( TypedefTable::ID ); 2480 2482 typedefTable.leaveScope(); 2481 $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $2 )->addQualifiers( $1 );2483 $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 ); 2482 2484 } 2483 2485 ;
Note:
See TracChangeset
for help on using the changeset viewer.