Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    re67991f rc1ed2ee  
    380380};
    381381
     382/// With statement `with (...) ...`
     383class WithStmt final : public Stmt {
     384public:
     385        std::vector<ptr<Expr>> exprs;
     386        ptr<Stmt> stmt;
     387
     388        WithStmt( const CodeLocation & loc, std::vector<ptr<Expr>> && exprs, const Stmt * stmt,
     389                std::vector<Label> && labels = {} )
     390        : Stmt(loc, std::move(labels)), exprs(std::move(exprs)), stmt(stmt) {}
     391
     392        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
     393private:
     394        WithStmt * clone() const override { return new WithStmt{ *this }; }
     395        MUTATE_FRIEND
     396};
     397
    382398/// Any declaration in a (compound) statement.
    383399class DeclStmt final : public Stmt {
Note: See TracChangeset for help on using the changeset viewer.