Ignore:
Timestamp:
Aug 16, 2016, 3:20:06 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
1f6d4624
Parents:
950f7a7 (diff), 7880579 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.cc

    r950f7a7 r7527e63  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:52:32 2016
    13 // Update Count     : 55
     12// Last Modified On : Fri Aug 12 13:58:48 2016
     13// Update Count     : 62
    1414//
    1515
     
    143143}
    144144
    145 SwitchStmt::SwitchStmt( std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches ):
    146         Statement( _labels ), condition( _condition ), branches( _branches ) {
     145SwitchStmt::SwitchStmt( std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_statements ):
     146        Statement( _labels ), condition( _condition ), statements( _statements ) {
    147147}
    148148
    149149SwitchStmt::SwitchStmt( const SwitchStmt & other ):
    150150        Statement( other ), condition( maybeClone( other.condition ) ) {
    151         cloneAll( other.branches, branches );
     151        cloneAll( other.statements, statements );
    152152}
    153153
    154154SwitchStmt::~SwitchStmt() {
    155155        delete condition;
    156         // destroy branches
    157 }
    158 
    159 void SwitchStmt::add_case( CaseStmt *c ) {}
     156        // destroy statements
     157}
    160158
    161159void SwitchStmt::print( std::ostream &os, int indent ) const {
     
    164162        os << endl;
    165163
    166         // branches
     164        // statements
    167165        std::list<Statement *>::const_iterator i;
    168         for ( i = branches.begin(); i != branches.end(); i++)
     166        for ( i = statements.begin(); i != statements.end(); i++)
    169167                (*i)->print( os, indent + 4 );
    170168
    171         //for_each( branches.begin(), branches.end(), mem_fun( bind1st(&Statement::print ), os ));
     169        //for_each( statements.begin(), statements.end(), mem_fun( bind1st(&Statement::print ), os ));
    172170}
    173171
     
    187185}
    188186
    189 CaseStmt * CaseStmt::makeDefault( std::list<Label> labels, std::list<Statement *> branches ) {
    190         return new CaseStmt( labels, 0, branches, true );
     187CaseStmt * CaseStmt::makeDefault( std::list<Label> labels, std::list<Statement *> stmts ) {
     188        return new CaseStmt( labels, 0, stmts, true );
    191189}
    192190
     
    311309}
    312310
    313 CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool isCatchRest ) :
    314         Statement( labels ), decl ( _decl ), body( _body ), catchRest ( isCatchRest ) {
     311CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool catchAny ) :
     312        Statement( labels ), decl ( _decl ), body( _body ), catchRest ( catchAny ) {
    315313}
    316314
Note: See TracChangeset for help on using the changeset viewer.