Changes in src/SynTree/Statement.h [6180274:6cebfef]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.h
r6180274 r6cebfef 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 2 20:15:30 202213 // Update Count : 9812 // Last Modified On : Fri Jan 10 14:13:24 2020 13 // Update Count : 85 14 14 // 15 15 … … 107 107 std::list<Label> gotolabels; 108 108 109 AsmStmt( bool voltile, Expression * instruction, const std::list<Expression *> output, const std::list<Expression *> input, const std::list<ConstantExpr *> clobber, conststd::list<Label> gotolabels );109 AsmStmt( bool voltile, Expression * instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ); 110 110 AsmStmt( const AsmStmt & other ); 111 111 virtual ~AsmStmt(); … … 148 148 public: 149 149 Expression * condition; 150 Statement * then ;151 Statement * else _;150 Statement * thenPart; 151 Statement * elsePart; 152 152 std::list<Statement *> initialization; 153 153 154 IfStmt( Expression * condition, Statement * then , Statement * else_,155 conststd::list<Statement *> initialization = std::list<Statement *>() );154 IfStmt( Expression * condition, Statement * thenPart, Statement * elsePart, 155 std::list<Statement *> initialization = std::list<Statement *>() ); 156 156 IfStmt( const IfStmt & other ); 157 157 virtual ~IfStmt(); … … 160 160 Expression * get_condition() { return condition; } 161 161 void set_condition( Expression * newValue ) { condition = newValue; } 162 Statement * get_then () { return then; }163 void set_then ( Statement * newValue ) { then= newValue; }164 Statement * get_else () { return else_; }165 void set_else ( Statement * newValue ) { else_= newValue; }162 Statement * get_thenPart() { return thenPart; } 163 void set_thenPart( Statement * newValue ) { thenPart = newValue; } 164 Statement * get_elsePart() { return elsePart; } 165 void set_elsePart( Statement * newValue ) { elsePart = newValue; } 166 166 167 167 virtual IfStmt * clone() const override { return new IfStmt( *this ); } … … 225 225 }; 226 226 227 class While DoStmt : public Statement {227 class WhileStmt : public Statement { 228 228 public: 229 229 Expression * condition; 230 230 Statement * body; 231 Statement * else_;232 231 std::list<Statement *> initialization; 233 232 bool isDoWhile; 234 233 235 WhileDoStmt( Expression * condition, Statement * body, const std::list<Statement *> & initialization, bool isDoWhile = false ); 236 WhileDoStmt( Expression * condition, Statement * body, Statement * else_, const std::list<Statement *> & initialization, bool isDoWhile = false ); 237 WhileDoStmt( const WhileDoStmt & other ); 238 virtual ~WhileDoStmt(); 234 WhileStmt( Expression * condition, Statement * body, std::list<Statement *> & initialization, bool isDoWhile = false ); 235 WhileStmt( const WhileStmt & other ); 236 virtual ~WhileStmt(); 239 237 240 238 Expression * get_condition() { return condition; } … … 245 243 void set_isDoWhile( bool newValue ) { isDoWhile = newValue; } 246 244 247 virtual While DoStmt * clone() const override { return new WhileDoStmt( *this ); }245 virtual WhileStmt * clone() const override { return new WhileStmt( *this ); } 248 246 virtual void accept( Visitor & v ) override { v.visit( this ); } 249 247 virtual void accept( Visitor & v ) const override { v.visit( this ); } … … 258 256 Expression * increment; 259 257 Statement * body; 260 Statement * else_; 261 262 ForStmt( const std::list<Statement *> initialization, Expression * condition = nullptr, Expression * increment = nullptr, Statement * body = nullptr, Statement * else_ = nullptr ); 258 259 ForStmt( std::list<Statement *> initialization, Expression * condition = nullptr, Expression * increment = nullptr, Statement * body = nullptr ); 263 260 ForStmt( const ForStmt & other ); 264 261 virtual ~ForStmt(); … … 281 278 class BranchStmt : public Statement { 282 279 public: 283 enum Type { Goto , Break, Continue, FallThrough, FallThroughDefault, BranchStmts};280 enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault }; 284 281 285 282 // originalTarget kept for error messages. … … 360 357 FinallyStmt * finallyBlock; 361 358 362 TryStmt( CompoundStmt * tryBlock, conststd::list<CatchStmt *> & handlers, FinallyStmt * finallyBlock = nullptr );359 TryStmt( CompoundStmt * tryBlock, std::list<CatchStmt *> & handlers, FinallyStmt * finallyBlock = nullptr ); 363 360 TryStmt( const TryStmt & other ); 364 361 virtual ~TryStmt(); … … 543 540 std::list<Expression *> mutexObjs; // list of mutex objects to acquire 544 541 545 MutexStmt( Statement * stmt, conststd::list<Expression *> mutexObjs );542 MutexStmt( Statement * stmt, std::list<Expression *> mutexObjs ); 546 543 MutexStmt( const MutexStmt & other ); 547 544 virtual ~MutexStmt();
Note:
See TracChangeset
for help on using the changeset viewer.