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