Changeset 6f4b7f2 for src/AST/Stmt.hpp


Ignore:
Timestamp:
May 24, 2019, 5:26:44 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
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
Message:

Finish Stmt printers, implement short_mode for Decls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    r21a44ca r6f4b7f2  
    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.