Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.cc

    r843054c2 rbe5aa1b  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:55:19 2015
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed May 27 15:41:13 2015
     13// Update Count     : 8
    1414//
    1515
     
    4646
    4747BranchStmt::BranchStmt( std::list<Label> labels, Label _target, Type _type ) throw ( SemanticError ) :
    48         Statement( labels ), target(_target ), type(_type ) {
     48        Statement( labels ), originalTarget(_target ), target(_target ), type(_type ) {
    4949        //actually this is a syntactic error signaled by the parser
    5050        if ( type == BranchStmt::Goto && target.size() == 0 )
     
    200200
    201201void ForStmt::print( std::ostream &os, int indent ) {
     202        os << "\r" << string( indent, ' ') << "Labels: {";
     203        for (std::list<Label>::iterator it = get_labels().begin(); it != get_labels().end(); ++it) {
     204                os << *it << ",";
     205        }
     206        os << "}" << endl;
     207
    202208        os << "\r" << string( indent, ' ') << "For Statement" << endl ;
    203209
Note: See TracChangeset for help on using the changeset viewer.