Changeset d1b9d78 for src/SynTree/Statement.h
- Timestamp:
- Jul 13, 2016, 1:44:00 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:
- 9c791dd
- Parents:
- 8884112 (diff), ed9ecda (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
r8884112 rd1b9d78 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:09:24 201513 // Update Count : 4 611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:53:29 2016 13 // Update Count : 47 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 CaseStmt171 };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 184 151 class CaseStmt : public Statement { 185 152 public:
Note:
See TracChangeset
for help on using the changeset viewer.