Changeset 2065609 for src/Parser


Ignore:
Timestamp:
Aug 28, 2017, 2:59:30 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
26238c1
Parents:
212c421e
Message:

Added new node to PassVisitor?.
Converted Keywords to PassVisitor?.
Fix crash in build waitfor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r212c421e r2065609  
    212212        WaitForStmt::Target target;
    213213        target.function = maybeBuild<Expression>( targetExpr );
    214         buildMoveList< Expression >( targetExpr, target.arguments );
     214
     215        ExpressionNode * next = dynamic_cast<ExpressionNode *>( targetExpr->get_next() );
     216        targetExpr->set_next( nullptr );
     217        buildMoveList< Expression >( next, target.arguments );
     218
    215219        delete targetExpr;
    216220
     
    226230WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when, WaitForStmt * node ) {
    227231        WaitForStmt::Target target;
    228 
    229232        target.function = maybeBuild<Expression>( targetExpr );
    230         buildMoveList< Expression >( targetExpr, target.arguments );
     233
     234        ExpressionNode * next = dynamic_cast<ExpressionNode *>( targetExpr->get_next() );
     235        targetExpr->set_next( nullptr );
     236        buildMoveList< Expression >( next, target.arguments );
     237
    231238        delete targetExpr;
    232239
Note: See TracChangeset for help on using the changeset viewer.