Changes in src/SynTree/Statement.h [68f9c43:cc32d83]
- File:
-
- 1 edited
-
src/SynTree/Statement.h (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.h
r68f9c43 rcc32d83 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 … … 38 38 39 39 Statement( const std::list<Label> & labels = {} ); 40 virtual ~Statement(); 40 41 41 42 std::list<Label> & get_labels() { return labels; } … … 55 56 CompoundStmt( std::list<Statement *> stmts ); 56 57 CompoundStmt( const CompoundStmt &other ); 58 virtual ~CompoundStmt(); 57 59 58 60 std::list<Statement*>& get_kids() { return kids; } … … 82 84 ExprStmt( Expression *expr ); 83 85 ExprStmt( const ExprStmt &other ); 86 virtual ~ExprStmt(); 84 87 85 88 Expression *get_expr() { return expr; } … … 102 105 AsmStmt( bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ); 103 106 AsmStmt( const AsmStmt &other ); 107 virtual ~AsmStmt(); 104 108 105 109 bool get_voltile() { return voltile; } … … 122 126 }; 123 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 124 141 class IfStmt : public Statement { 125 142 public: … … 132 149 std::list<Statement *> initialization = std::list<Statement *>() ); 133 150 IfStmt( const IfStmt &other ); 151 virtual ~IfStmt(); 134 152 135 153 std::list<Statement *> &get_initialization() { return initialization; } … … 154 172 SwitchStmt( Expression *condition, const std::list<Statement *> &statements ); 155 173 SwitchStmt( const SwitchStmt &other ); 174 virtual ~SwitchStmt(); 156 175 157 176 Expression *get_condition() { return condition; } … … 175 194 CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException); 176 195 CaseStmt( const CaseStmt &other ); 196 virtual ~CaseStmt(); 177 197 178 198 static CaseStmt * makeDefault( const std::list<Label> & labels = {}, std::list<Statement *> stmts = std::list<Statement *>() ); … … 205 225 Statement *body, bool isDoWhile = false ); 206 226 WhileStmt( const WhileStmt &other ); 227 virtual ~WhileStmt(); 207 228 208 229 Expression *get_condition() { return condition; } … … 229 250 Expression *condition = 0, Expression *increment = 0, Statement *body = 0 ); 230 251 ForStmt( const ForStmt &other ); 252 virtual ~ForStmt(); 231 253 232 254 std::list<Statement *> &get_initialization() { return initialization; } … … 246 268 class BranchStmt : public Statement { 247 269 public: 248 enum Type { Goto = 0, Break, Continue };270 enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault }; 249 271 250 272 // originalTarget kept for error messages. … … 281 303 ReturnStmt( Expression *expr ); 282 304 ReturnStmt( const ReturnStmt &other ); 305 virtual ~ReturnStmt(); 283 306 284 307 Expression *get_expr() { return expr; } … … 301 324 ThrowStmt( Kind kind, Expression * expr, Expression * target = nullptr ); 302 325 ThrowStmt( const ThrowStmt &other ); 326 virtual ~ThrowStmt(); 303 327 304 328 Kind get_kind() { return kind; } … … 322 346 TryStmt( CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 ); 323 347 TryStmt( const TryStmt &other ); 348 virtual ~TryStmt(); 324 349 325 350 CompoundStmt *get_block() const { return block; } … … 348 373 Expression *cond, Statement *body ); 349 374 CatchStmt( const CatchStmt &other ); 375 virtual ~CatchStmt(); 350 376 351 377 Kind get_kind() { return kind; } … … 369 395 FinallyStmt( CompoundStmt *block ); 370 396 FinallyStmt( const FinallyStmt &other ); 397 virtual ~FinallyStmt(); 371 398 372 399 CompoundStmt *get_block() const { return block; } … … 395 422 WaitForStmt(); 396 423 WaitForStmt( const WaitForStmt & ); 424 virtual ~WaitForStmt(); 397 425 398 426 std::vector<Clause> clauses; … … 423 451 WithStmt( const std::list< Expression * > & exprs, Statement * stmt ); 424 452 WithStmt( const WithStmt & other ); 453 virtual ~WithStmt(); 425 454 426 455 virtual WithStmt * clone() const override { return new WithStmt( *this ); } … … 438 467 DeclStmt( Declaration *decl ); 439 468 DeclStmt( const DeclStmt &other ); 469 virtual ~DeclStmt(); 440 470 441 471 Declaration *get_decl() const { return decl; } … … 459 489 ImplicitCtorDtorStmt( Statement * callStmt ); 460 490 ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other ); 491 virtual ~ImplicitCtorDtorStmt(); 461 492 462 493 Statement *get_callStmt() const { return callStmt; }
Note:
See TracChangeset
for help on using the changeset viewer.