Changeset 6a276a0 for src/SynTree
- Timestamp:
- Mar 14, 2018, 1:19:39 PM (7 years ago)
- 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:
- 720a007
- Parents:
- e2c70ab
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
re2c70ab r6a276a0 34 34 Statement::Statement( const std::list<Label> & labels ) : labels( labels ) {} 35 35 36 void Statement::print( std::ostream & os, Indenter ) const {36 void Statement::print( std::ostream & os, Indenter indent ) const { 37 37 if ( ! labels.empty() ) { 38 os << "Labels: {";38 os << indent << "... Labels: {"; 39 39 for ( const Label & l : labels ) { 40 40 os << l << ","; … … 223 223 224 224 void CaseStmt::print( std::ostream &os, Indenter indent ) const { 225 if ( isDefault() ) os << "Default ";225 if ( isDefault() ) os << indent << "Default "; 226 226 else { 227 os << "Case ";227 os << indent << "Case "; 228 228 condition->print( os, indent ); 229 229 } // if … … 231 231 232 232 for ( Statement * stmt : stmts ) { 233 os << indent+1; 233 234 stmt->print( os, indent+1 ); 234 235 } … … 478 479 } 479 480 480 void NullStmt::print( std::ostream &os, Indenter ) const {481 void NullStmt::print( std::ostream &os, Indenter indent ) const { 481 482 os << "Null Statement" << endl; 483 Statement::print( os, indent ); 482 484 } 483 485 -
src/SynTree/Statement.h
re2c70ab r6a276a0 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Sep 3 20:46:46 201713 // Update Count : 7 712 // Last Modified On : Thu Mar 8 14:53:02 2018 13 // Update Count : 78 14 14 // 15 15 … … 255 255 class BranchStmt : public Statement { 256 256 public: 257 enum Type { Goto = 0, Break, Continue };257 enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault }; 258 258 259 259 // originalTarget kept for error messages.
Note:
See TracChangeset
for help on using the changeset viewer.