Changeset 90152a4 for src/SynTree/Statement.h
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (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
rf9feab8 r90152a4 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 … … 126 126 }; 127 127 128 class DirectiveStmt : public Statement { 129 public: 130 std::string directive; 131 132 DirectiveStmt( const std::string & ); 133 virtual ~DirectiveStmt(){} 134 135 virtual DirectiveStmt * clone() const { return new DirectiveStmt( *this ); } 136 virtual void accept( Visitor & v ) { v.visit( this ); } 137 virtual Statement * acceptMutator( Mutator & m ) { return m.mutate( this ); } 138 virtual void print( std::ostream & os, Indenter indent = {} ) const; 139 }; 140 128 141 class IfStmt : public Statement { 129 142 public: … … 179 192 std::list<Statement *> stmts; 180 193 181 CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticError);194 CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException); 182 195 CaseStmt( const CaseStmt &other ); 183 196 virtual ~CaseStmt(); … … 207 220 Expression *condition; 208 221 Statement *body; 222 std::list<Statement *> initialization; 209 223 bool isDoWhile; 210 224 211 225 WhileStmt( Expression *condition, 212 Statement *body, bool isDoWhile = false );226 Statement *body, std::list<Statement *> & initialization, bool isDoWhile = false ); 213 227 WhileStmt( const WhileStmt &other ); 214 228 virtual ~WhileStmt(); … … 255 269 class BranchStmt : public Statement { 256 270 public: 257 enum Type { Goto = 0, Break, Continue };271 enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault }; 258 272 259 273 // originalTarget kept for error messages. … … 263 277 Type type; 264 278 265 BranchStmt( Label target, Type ) throw (SemanticError );266 BranchStmt( Expression *computedTarget, Type ) throw (SemanticError );279 BranchStmt( Label target, Type ) throw (SemanticErrorException); 280 BranchStmt( Expression *computedTarget, Type ) throw (SemanticErrorException); 267 281 268 282 Label get_originalTarget() { return originalTarget; }
Note:
See TracChangeset
for help on using the changeset viewer.