Changes in src/SynTree/Statement.h [4e06c1e:0f8e4ac]
- File:
-
- 1 edited
-
src/SynTree/Statement.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.h
r4e06c1e r0f8e4ac 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:53:29 201613 // Update Count : 4 711 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Dec 09 14:09:24 2015 13 // Update Count : 46 14 14 // 15 15 … … 149 149 }; 150 150 151 class ChooseStmt : public Statement { 152 public: 153 ChooseStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &branches ); 154 ChooseStmt( const ChooseStmt &other ); 155 virtual ~ChooseStmt(); 156 157 Expression *get_condition() { return condition; } 158 void set_condition( Expression *newValue ) { condition = newValue; } 159 160 std::list<Statement *>& get_branches() { return branches; } 161 void add_case( CaseStmt * ); 162 163 virtual void accept( Visitor &v ) { v.visit( this ); } 164 virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); } 165 166 virtual ChooseStmt *clone() const { return new ChooseStmt( *this ); } 167 virtual void print( std::ostream &os, int indent = 0 ) const; 168 private: 169 Expression *condition; 170 std::list<Statement *> branches; // should be list of CaseStmt 171 }; 172 173 class FallthruStmt : public Statement { 174 public: 175 FallthruStmt( std::list<Label> labels ) : Statement( labels ) { } 176 177 virtual void accept( Visitor &v ) { v.visit( this ); } 178 virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); } 179 180 virtual FallthruStmt *clone() const { return new FallthruStmt( *this ); } 181 virtual void print( std::ostream &os, int indent = 0 ) const; 182 }; 183 151 184 class CaseStmt : public Statement { 152 185 public:
Note:
See TracChangeset
for help on using the changeset viewer.