Changeset 1dcd9554 for src/SynTree
- Timestamp:
- Sep 14, 2017, 3:42:14 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, resolv-new, with_gc
- Children:
- 310e5b7
- Parents:
- f92c696
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
rf92c696 r1dcd9554 168 168 } 169 169 170 SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, std::list<Statement *> &statements ):170 SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, const std::list<Statement *> &statements ): 171 171 Statement( labels ), condition( condition ), statements( statements ) { 172 172 } … … 196 196 } 197 197 198 CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) :198 CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) : 199 199 Statement( labels ), condition( condition ), stmts( statements ), _isDefault( deflt ) { 200 200 if ( isDefault() && condition != 0 ) -
src/SynTree/Statement.h
rf92c696 r1dcd9554 157 157 std::list<Statement *> statements; 158 158 159 SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements );159 SwitchStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements ); 160 160 SwitchStmt( const SwitchStmt &other ); 161 161 virtual ~SwitchStmt(); … … 179 179 std::list<Statement *> stmts; 180 180 181 CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);181 CaseStmt( std::list<Label> labels, Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError); 182 182 CaseStmt( const CaseStmt &other ); 183 183 virtual ~CaseStmt();
Note: See TracChangeset
for help on using the changeset viewer.