Ignore:
Timestamp:
Dec 5, 2017, 2:35:03 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
f9feab8
Parents:
9c35431 (diff), 65197c2 (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.
Message:

Merge branch 'master' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r9c35431 rc13e8dc8  
    10581058with_statement:
    10591059        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                }
    10611063        ;
    10621064
     
    24102412                { $$ = nullptr; }
    24112413        | WITH '(' tuple_expression_list ')'
    2412                 { throw SemanticError("With clause is currently unimplemented."); $$ = nullptr; } // FIX ME
     2414                { $$ = new StatementNode( build_with( $3, nullptr ) ); }
    24132415        ;
    24142416
     
    24202422                        // Add the function body to the last identifier in the function definition list, i.e., foo3:
    24212423                        //   [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; }
    2422                         $1->get_last()->addFunctionBody( $3 );
     2424                        $1->get_last()->addFunctionBody( $3, $2 );
    24232425                        $$ = $1;
    24242426                }
     
    24282430                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24292431                        typedefTable.leaveScope();
    2430                         $$ = $2->addFunctionBody( $4 )->addType( $1 );
     2432                        $$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
    24312433                }
    24322434                // handles default int return type, OBSOLESCENT (see 1)
     
    24352437                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24362438                        typedefTable.leaveScope();
    2437                         $$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );
     2439                        $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
    24382440                }
    24392441                // handles default int return type, OBSOLESCENT (see 1)
     
    24422444                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24432445                        typedefTable.leaveScope();
    2444                         $$ = $2->addFunctionBody( $4 )->addQualifiers( $1 );
     2446                        $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
    24452447                }
    24462448                // handles default int return type, OBSOLESCENT (see 1)
     
    24492451                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24502452                        typedefTable.leaveScope();
    2451                         $$ = $3->addFunctionBody( $5 )->addQualifiers( $2 )->addQualifiers( $1 );
     2453                        $$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 );
    24522454                }
    24532455
     
    24582460                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24592461                        typedefTable.leaveScope();
    2460                         $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addType( $1 );
     2462                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addType( $1 );
    24612463                }
    24622464                // handles default int return type, OBSOLESCENT (see 1)
     
    24652467                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24662468                        typedefTable.leaveScope();
    2467                         $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
     2469                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
    24682470                }
    24692471                // handles default int return type, OBSOLESCENT (see 1)
     
    24722474                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24732475                        typedefTable.leaveScope();
    2474                         $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5 )->addQualifiers( $1 );
     2476                        $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
    24752477                }
    24762478                // handles default int return type, OBSOLESCENT (see 1)
     
    24792481                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24802482                        typedefTable.leaveScope();
    2481                         $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6 )->addQualifiers( $2 )->addQualifiers( $1 );
     2483                        $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 );
    24822484                }
    24832485        ;
Note: See TracChangeset for help on using the changeset viewer.