Changes in src/AST/Stmt.hpp [94b1f718:a7d50b6]
- File:
-
- 1 edited
-
src/AST/Stmt.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
r94b1f718 ra7d50b6 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.