Ignore:
Timestamp:
Aug 22, 2016, 2:28:47 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
2acf5fc
Parents:
80722d0
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r80722d0 rab57786  
    1010// Created On       : Sat May 16 14:59:41 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 15 20:47:11 2016
    13 // Update Count     : 322
     12// Last Modified On : Sun Aug 21 11:59:37 2016
     13// Update Count     : 325
    1414//
    1515
     
    138138}
    139139
    140 Statement *build_branch( std::string identifier, BranchStmt::Type kind ) {
    141         return new BranchStmt( noLabels, identifier, kind );
     140Statement *build_branch( BranchStmt::Type kind ) {
     141        Statement * ret = new BranchStmt( noLabels, "", kind );
     142        return ret;
     143}
     144Statement *build_branch( std::string *identifier, BranchStmt::Type kind ) {
     145        Statement * ret = new BranchStmt( noLabels, *identifier, kind );
     146        delete identifier;                                                                      // allocated by lexer
     147        return ret;
    142148}
    143149Statement *build_computedgoto( ExpressionNode *ctl ) {
Note: See TracChangeset for help on using the changeset viewer.