Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    r94b1f718 ra7d50b6  
    268268};
    269269
     270/// Kind of exception
     271enum ExceptionKind { Terminate, Resume };
     272
    270273/// Throw statement `throw ...`
    271274class ThrowStmt final : public Stmt {
    272275public:
    273         enum Kind { Terminate, Resume };
    274 
    275276        ptr<Expr> expr;
    276277        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,
    280282                std::vector<Label> && labels = {} )
    281283        : Stmt(loc, std::move(labels)), expr(expr), target(target), kind(kind) {}
     
    294296        ptr<FinallyStmt> finally;
    295297
    296         TryStmt( const CodeLocation & loc, const CompoundStmt * body,
     298        TryStmt(
     299                const CodeLocation & loc, const CompoundStmt * body,
    297300                std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally,
    298301                std::vector<Label> && labels = {} )
     
    308311class CatchStmt final : public Stmt {
    309312public:
    310         enum Kind { Terminate, Resume };
    311 
    312313        ptr<Decl> decl;
    313314        ptr<Expr> cond;
    314315        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,
    318320                const Stmt * body, std::vector<Label> && labels = {} )
    319321        : Stmt(loc, std::move(labels)), decl(decl), cond(cond), body(body), kind(kind) {}
Note: See TracChangeset for help on using the changeset viewer.