Changeset 17238fd for src/Parser


Ignore:
Timestamp:
May 29, 2018, 8:02:32 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, with_gc
Children:
cb4bbb6
Parents:
533540a
Message:

possible push/pop correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r533540a r17238fd  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 28 17:01:36 2018
    13 // Update Count     : 3383
     12// Last Modified On : Tue May 29 07:24:32 2018
     13// Update Count     : 3387
    1414//
    1515
     
    837837//      | '[' push assignment_expression pop ']'
    838838//              { $$ = new ExpressionNode( build_tuple( $3 ) ); }
    839         '[' push ',' tuple_expression_list pop ']'
    840                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $4 ) ) ); }
    841         | '[' push assignment_expression ',' tuple_expression_list pop ']'
    842                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_last( $5 ) ) ); }
     839        '[' ',' tuple_expression_list ']'
     840                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $3 ) ) ); }
     841        | '[' push assignment_expression pop ',' tuple_expression_list ']'
     842                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_last( $6 ) ) ); }
    843843        ;
    844844
Note: See TracChangeset for help on using the changeset viewer.