Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r1dda8de r553772b  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr 15 15:02:56 2019
    13 // Update Count     : 4290
     12// Last Modified On : Wed May 15 21:25:27 2019
     13// Update Count     : 4296
    1414//
    1515
     
    173173DeclarationNode * fieldDecl( DeclarationNode * typeSpec, DeclarationNode * fieldList ) {
    174174        if ( ! fieldList ) {                                                            // field declarator ?
    175                 if ( ! ( typeSpec->type && typeSpec->type->kind == TypeData::Aggregate ) ) {
     175                if ( ! ( typeSpec->type && (typeSpec->type->kind == TypeData::Aggregate || typeSpec->type->kind == TypeData::Enum) ) ) {
    176176                        stringstream ss;
    177177                        typeSpec->type->print( ss );
     
    275275%token ENUM STRUCT UNION
    276276%token EXCEPTION                                                                                // CFA
    277 %token COROUTINE MONITOR THREAD                                                 // CFA
     277%token GENERATOR COROUTINE MONITOR THREAD                               // CFA
    278278%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    279279%token SIZEOF OFFSETOF
     
    677677        // empty
    678678                { $$ = nullptr; }
    679         | '?'                                                                                           // CFA, default parameter
     679        | '@'                                                                                           // CFA, default parameter
    680680                { SemanticError( yylloc, "Default parameter for argument is currently unimplemented." ); $$ = nullptr; }
    681681                // { $$ = new ExpressionNode( build_constantInteger( *new string( "2" ) ) ); }
     
    796796                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    797797                // keyword cast cannot be grouped because of reduction in aggregate_key
     798        | '(' GENERATOR '&' ')' cast_expression                         // CFA
     799                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Coroutine, $5 ) ); }
    798800        | '(' COROUTINE '&' ')' cast_expression                         // CFA
    799801                { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Coroutine, $5 ) ); }
     
    20612063        | EXCEPTION
    20622064                { yyy = true; $$ = DeclarationNode::Exception; }
     2065        | GENERATOR
     2066                { yyy = true; $$ = DeclarationNode::Coroutine; }
    20632067        | COROUTINE
    20642068                { yyy = true; $$ = DeclarationNode::Coroutine; }
Note: See TracChangeset for help on using the changeset viewer.