Ignore:
Timestamp:
Feb 13, 2018, 11:41:26 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
8f67d44
Parents:
418d773a
Message:

grammar rules for initializer in assignment and return

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r418d773a r9c75137  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec 21 11:32:56 2017
    13 // Update Count     : 2996
     12// Last Modified On : Tue Feb 13 11:40:34 2018
     13// Update Count     : 2999
    1414//
    1515
     
    482482                { $$ = new ExpressionNode( new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >($2) ) ) ); }
    483483        | type_name '.' no_attr_identifier                                      // CFA, nested type
    484                 { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; }                                                          // FIX ME
     484                { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; } // FIX ME
    485485        | type_name '.' '[' push field_list pop ']'                     // CFA, nested type / tuple field selector
    486                 { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; }                                                          // FIX ME
     486                { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; } // FIX ME
    487487        ;
    488488
     
    767767        | unary_expression assignment_operator assignment_expression
    768768                { $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) ); }
     769        | unary_expression '=' '{' initializer_list comma_opt '}' // FIX ME
     770                { $$ = nullptr; }
    769771        ;
    770772
     
    10501052        | RETURN comma_expression_opt ';'
    10511053                { $$ = new StatementNode( build_return( $2 ) ); }
     1054        | RETURN '{' initializer_list comma_opt '}'                     // FIX ME
     1055                { $$ = nullptr; }
    10521056        | THROW assignment_expression_opt ';'                           // handles rethrow
    10531057                { $$ = new StatementNode( build_throw( $2 ) ); }
Note: See TracChangeset for help on using the changeset viewer.