Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    ra7d50b6 r94b1f718  
    268268};
    269269
    270 /// Kind of exception
    271 enum ExceptionKind { Terminate, Resume };
    272 
    273270/// Throw statement `throw ...`
    274271class ThrowStmt final : public Stmt {
    275272public:
     273        enum Kind { Terminate, Resume };
     274
    276275        ptr<Expr> expr;
    277276        ptr<Expr> target;
    278         ExceptionKind kind;
    279 
    280         ThrowStmt(
    281                 const CodeLocation & loc, ExceptionKind kind, const Expr * expr, const Expr * target,
     277        Kind kind;
     278
     279        ThrowStmt( const CodeLocation & loc, Kind kind, const Expr * expr, const Expr * target,
    282280                std::vector<Label> && labels = {} )
    283281        : Stmt(loc, std::move(labels)), expr(expr), target(target), kind(kind) {}
     
    296294        ptr<FinallyStmt> finally;
    297295
    298         TryStmt(
    299                 const CodeLocation & loc, const CompoundStmt * body,
     296        TryStmt( const CodeLocation & loc, const CompoundStmt * body,
    300297                std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally,
    301298                std::vector<Label> && labels = {} )
     
    311308class CatchStmt final : public Stmt {
    312309public:
     310        enum Kind { Terminate, Resume };
     311
    313312        ptr<Decl> decl;
    314313        ptr<Expr> cond;
    315314        ptr<Stmt> body;
    316         ExceptionKind kind;
    317 
    318         CatchStmt(
    319                 const CodeLocation & loc, ExceptionKind kind, const Decl * decl, const Expr * cond,
     315        Kind kind;
     316
     317        CatchStmt( const CodeLocation & loc, Kind kind, const Decl * decl, const Expr * cond,
    320318                const Stmt * body, std::vector<Label> && labels = {} )
    321319        : Stmt(loc, std::move(labels)), decl(decl), cond(cond), body(body), kind(kind) {}
Note: See TracChangeset for help on using the changeset viewer.