Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    rc570806 r99da267  
    382382};
    383383
     384/// With statement `with (...) ...`
     385class WithStmt final : public Stmt {
     386public:
     387        std::vector<ptr<Expr>> exprs;
     388        ptr<Stmt> stmt;
     389
     390        WithStmt( const CodeLocation & loc, std::vector<ptr<Expr>> && exprs, const Stmt * stmt,
     391                std::vector<Label> && labels = {} )
     392        : Stmt(loc, std::move(labels)), exprs(std::move(exprs)), stmt(stmt) {}
     393
     394        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
     395private:
     396        WithStmt * clone() const override { return new WithStmt{ *this }; }
     397        MUTATE_FRIEND
     398};
     399
    384400/// Any declaration in a (compound) statement.
    385401class DeclStmt final : public Stmt {
     
    399415class ImplicitCtorDtorStmt final : public Stmt {
    400416public:
    401         ptr<Stmt> callStmt;
     417        readonly<Stmt> callStmt;
    402418
    403419        ImplicitCtorDtorStmt( const CodeLocation & loc, const Stmt * callStmt,
Note: See TracChangeset for help on using the changeset viewer.