Changeset 6f4b7f2 for src/AST/Stmt.hpp
- Timestamp:
- May 24, 2019, 5:26:44 PM (6 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:
- a7d50b6, c519942
- Parents:
- 21a44ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
r21a44ca r6f4b7f2 268 268 }; 269 269 270 /// Kind of exception 271 enum ExceptionKind { Terminate, Resume }; 272 270 273 /// Throw statement `throw ...` 271 274 class ThrowStmt final : public Stmt { 272 275 public: 273 enum Kind { Terminate, Resume };274 275 276 ptr<Expr> expr; 276 277 ptr<Expr> target; 277 Kind kind; 278 279 ThrowStmt( const CodeLocation & loc, Kind kind, const Expr * expr, const Expr * target, 278 ExceptionKind kind; 279 280 ThrowStmt( 281 const CodeLocation & loc, ExceptionKind kind, const Expr * expr, const Expr * target, 280 282 std::vector<Label> && labels = {} ) 281 283 : Stmt(loc, std::move(labels)), expr(expr), target(target), kind(kind) {} … … 294 296 ptr<FinallyStmt> finally; 295 297 296 TryStmt( const CodeLocation & loc, const CompoundStmt * body, 298 TryStmt( 299 const CodeLocation & loc, const CompoundStmt * body, 297 300 std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally, 298 301 std::vector<Label> && labels = {} ) … … 308 311 class CatchStmt final : public Stmt { 309 312 public: 310 enum Kind { Terminate, Resume };311 312 313 ptr<Decl> decl; 313 314 ptr<Expr> cond; 314 315 ptr<Stmt> body; 315 Kind kind; 316 317 CatchStmt( const CodeLocation & loc, Kind kind, const Decl * decl, const Expr * cond, 316 ExceptionKind kind; 317 318 CatchStmt( 319 const CodeLocation & loc, ExceptionKind kind, const Decl * decl, const Expr * cond, 318 320 const Stmt * body, std::vector<Label> && labels = {} ) 319 321 : Stmt(loc, std::move(labels)), decl(decl), cond(cond), body(body), kind(kind) {}
Note: See TracChangeset
for help on using the changeset viewer.