Changeset c11e31c for translator/SynTree/Statement.cc
- Timestamp:
- May 14, 2015, 1:44:55 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 4bf5298
- Parents:
- d4778a6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/SynTree/Statement.cc
rd4778a6 rc11e31c 14 14 15 15 16 // *** Statement17 16 Statement::Statement(std::list<Label> _labels): 18 17 labels(_labels) {} … … 22 21 Statement::~Statement() {} 23 22 24 //*** ExprStmt25 23 ExprStmt::ExprStmt( std::list<Label> _labels, Expression *_expr ): 26 24 Statement(_labels), expr(_expr) {} … … 33 31 } 34 32 35 //*** BranchStmt36 33 const char *BranchStmt::brType[] = { "Goto", "Break", "Continue" }; 37 34 … … 57 54 } 58 55 59 //*** ReturnStmt60 56 ReturnStmt::ReturnStmt( std::list<Label> labels, Expression *_expr, bool throwP ) : 61 57 Statement( labels ), expr( _expr ), isThrow( throwP ) {} … … 72 68 73 69 74 // *** IfStmt75 70 IfStmt::IfStmt( std::list<Label> _labels, Expression *_condition, Statement *_thenPart, Statement *_elsePart ): 76 71 Statement(_labels), condition(_condition), thenPart(_thenPart), elsePart(_elsePart) {} … … 91 86 } 92 87 93 // *** SwitchStmt94 88 SwitchStmt::SwitchStmt(std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches): 95 89 Statement(_labels), condition(_condition), branches(_branches) … … 116 110 } 117 111 118 // *** CaseStmt119 112 CaseStmt::CaseStmt( std::list<Label> _labels, Expression *_condition, 120 113 std::list<Statement *> &_statements, bool deflt ) … … 147 140 } 148 141 149 //*** ChooseStmt150 142 //ChooseStmt::ChooseStmt( std::list<Label> labels, Expression *condition, Statement *body ) {} 151 143 ChooseStmt::ChooseStmt(std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches): … … 172 164 } 173 165 174 //*** FallthruStmt175 166 void FallthruStmt::print(std::ostream &os, int indent) { 176 167 os << "\r" << string(indent, ' ') << "Fall-through statement" << endl; 177 168 } 178 169 179 //*** WhileStmt180 170 WhileStmt::WhileStmt( std::list<Label> labels, Expression *condition_, 181 171 Statement *body_, bool isDoWhile_ ): … … 196 186 } 197 187 198 //*** ForStmt199 188 ForStmt::ForStmt( std::list<Label> labels, Statement *initialization_, 200 189 Expression *condition_, Expression *increment_, Statement *body_ ): … … 233 222 } 234 223 235 //*** TryStmt236 224 TryStmt::TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<Statement *> &_handlers, FinallyStmt *_finallyBlock ) : 237 225 Statement( labels ), block( tryBlock ), handlers( _handlers ), finallyBlock( _finallyBlock ) … … 266 254 } 267 255 268 //*** CatchStmt269 256 CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool isCatchRest ) : 270 257 Statement( labels ), decl ( _decl ), body( _body ), catchRest ( isCatchRest ) … … 290 277 291 278 292 //*** FinallyStmt293 279 FinallyStmt::FinallyStmt( std::list<Label> labels, CompoundStmt *_block ) : 294 280 Statement( labels ), block( _block ) … … 307 293 } 308 294 309 //*** NullStmt310 295 NullStmt::NullStmt( std::list<Label> labels ) : CompoundStmt( labels ) {} 311 296 NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {}
Note: See TracChangeset
for help on using the changeset viewer.