Changes in / [18ea270:de934c7]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r18ea270 rde934c7  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 22 21:26:01 2023
    13 // Update Count     : 6002
     12// Last Modified On : Tue Mar 21 19:01:00 2023
     13// Update Count     : 5990
    1414//
    1515
     
    270270        SemanticError( yylloc, ::toString( "Identifier \"", identifier, "\" cannot appear before a ", kind, ".\n"
    271271                                   "Possible cause is misspelled storage/CV qualifier, misspelled typename, or missing generic parameter." ) );
    272 } // IdentifierBeforeType
    273 
    274 static bool TypedefForall( DeclarationNode * decl ) {
    275         if ( decl->type->forall || (decl->type->kind == TypeData::Aggregate && decl->type->aggregate.params) ) {
    276                 SemanticError( yylloc, "forall qualifier in typedef is currently unimplemented." );
    277                 return true;
    278         } // if
    279         return false;
    280272} // IdentifierBeforeType
    281273
     
    19661958        TYPEDEF type_specifier declarator
    19671959                {
     1960                        // if type_specifier is an anon aggregate => name
    19681961                        typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "4" );
    1969                         if ( TypedefForall( $2 ) ) $$ = nullptr;
    1970                         else $$ = $3->addType( $2 )->addTypedef();              // watchout frees $2 and $3
     1962                        $$ = $3->addType( $2 )->addTypedef();           // watchout frees $2 and $3
    19711963                }
    19721964        | typedef_declaration pop ',' push declarator
     
    19781970                {
    19791971                        typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "6" );
    1980                         if ( TypedefForall( $1 ) ) $$ = nullptr;
    1981                         else $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef();
     1972                        $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef();
    19821973                }
    19831974        | type_specifier TYPEDEF declarator
    19841975                {
    19851976                        typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "7" );
    1986                         if ( TypedefForall( $1 ) ) $$ = nullptr;
    1987                         else $$ = $3->addType( $1 )->addTypedef();
     1977                        $$ = $3->addType( $1 )->addTypedef();
    19881978                }
    19891979        | type_specifier TYPEDEF type_qualifier_list declarator
    19901980                {
    19911981                        typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "8" );
    1992                         if ( TypedefForall( $3 ) ) $$ = nullptr;
    1993                         else $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef();
     1982                        $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef();
    19941983                }
    19951984        ;
Note: See TracChangeset for help on using the changeset viewer.