Ignore:
Timestamp:
Jun 5, 2018, 10:16:46 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:
2248dc7, dafdbe7
Parents:
6e3eaa57
Message:

add if control to while loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r6e3eaa57 r401e61f  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jun  4 21:24:46 2018
    13 // Update Count     : 3488
     12// Last Modified On : Mon Jun  4 22:22:04 2018
     13// Update Count     : 3492
    1414//
    1515
     
    10501050
    10511051iteration_statement:
    1052         WHILE '(' comma_expression ')' statement
    1053                 { $$ = new StatementNode( build_while( $3, $5 ) ); }
     1052        WHILE '(' push if_control_expression ')' statement pop
     1053                { $$ = new StatementNode( build_while( $4, $6 ) ); }
    10541054        | DO statement WHILE '(' comma_expression ')' ';'
    1055                 { $$ = new StatementNode( build_while( $5, $2, true ) ); }
     1055                { $$ = new StatementNode( build_do_while( $5, $2 ) ); }
    10561056        | FOR '(' push for_control_expression ')' statement pop
    10571057                { $$ = new StatementNode( build_for( $4, $6 ) ); }
Note: See TracChangeset for help on using the changeset viewer.