Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r481115f ra16a7ec  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Nov 27 17:23:35 2017
    13 // Update Count     : 2992
     12// Last Modified On : Sun Nov 26 11:36:36 2017
     13// Update Count     : 2969
    1414//
    1515
     
    13641364                        $$ = $3->addQualifiers( $1 )->addQualifiers( $2 );
    13651365                }
    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 ) );
     1366        | cfa_function_declaration pop ',' push identifier_or_type_name
     1367                {
     1368                        typedefTable.addToEnclosingScope( *$5, TypedefTable::ID );
     1369                        $$ = $1->appendList( $1->cloneType( $5 ) );
    13721370                }
    13731371        ;
     
    24182416                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    24192417                        typedefTable.leaveScope();
    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;
     2418                        $$ = $1->addFunctionBody( $3 );
    24242419                }
    24252420        | declaration_specifier function_declarator with_clause_opt compound_statement
Note: See TracChangeset for help on using the changeset viewer.