Changeset 7527e63 for src/SynTree/Statement.h
- Timestamp:
- Aug 16, 2016, 3:20:06 PM (9 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.h
r950f7a7 r7527e63 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:53:29201613 // Update Count : 4712 // Last Modified On : Fri Aug 12 13:57:46 2016 13 // Update Count : 65 14 14 // 15 15 … … 129 129 class SwitchStmt : public Statement { 130 130 public: 131 SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> & branches );131 SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements ); 132 132 SwitchStmt( const SwitchStmt &other ); 133 133 virtual ~SwitchStmt(); … … 136 136 void set_condition( Expression *newValue ) { condition = newValue; } 137 137 138 std::list<Statement *> & get_branches() { return branches; } 139 void add_case( CaseStmt * ); 138 std::list<Statement *> & get_statements() { return statements; } 140 139 141 140 virtual void accept( Visitor &v ) { v.visit( this ); } … … 146 145 private: 147 146 Expression * condition; 148 std::list<Statement *> branches; // should be list of CaseStmt147 std::list<Statement *> statements; 149 148 }; 150 149 151 150 class CaseStmt : public Statement { 152 151 public: 153 CaseStmt( std::list<Label> labels, Expression *conditions, 154 std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError); 152 CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError); 155 153 CaseStmt( const CaseStmt &other ); 156 154 virtual ~CaseStmt(); 157 155 158 static CaseStmt * makeDefault( std::list<Label> labels = std::list<Label>(), 159 std::list<Statement *> stmts = std::list<Statement *>() ); 156 static CaseStmt * makeDefault( std::list<Label> labels = std::list<Label>(), std::list<Statement *> stmts = std::list<Statement *>() ); 160 157 161 158 bool isDefault() const { return _isDefault; } … … 317 314 class CatchStmt : public Statement { 318 315 public: 319 CatchStmt( std::list<Label> labels, Declaration *decl, Statement *body, bool isCatchRest= false );316 CatchStmt( std::list<Label> labels, Declaration *decl, Statement *body, bool catchAny = false ); 320 317 CatchStmt( const CatchStmt &other ); 321 318 virtual ~CatchStmt();
Note:
See TracChangeset
for help on using the changeset viewer.