Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    rc92bdcc r525f7ad  
    237237        ptr<Expr> cond;
    238238        ptr<Expr> inc;
     239        ptr<Expr> range_over;
    239240        ptr<Stmt> body;
    240241        ptr<Stmt> else_;
     
    242243        ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * cond,
    243244                         const Expr * inc, const Stmt * body, const std::vector<Label> && label = {} )
    244                 : Stmt(loc, std::move(label)), inits(std::move(inits)), cond(cond), inc(inc), body(body), else_(nullptr) {}
     245                : Stmt(loc, std::move(label)), inits(std::move(inits)), cond(cond), inc(inc),
     246                        range_over(nullptr), body(body), else_(nullptr) {}
    245247
    246248        ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * cond,
    247249                         const Expr * inc, const Stmt * body, const Stmt * else_, const std::vector<Label> && labels = {} )
    248                 : Stmt(loc, std::move(labels)), inits(std::move(inits)), cond(cond), inc(inc), body(body), else_(else_) {}
     250                : Stmt(loc, std::move(labels)), inits(std::move(inits)), cond(cond), inc(inc),
     251                        range_over(nullptr), body(body), else_(else_) {}
     252
     253        ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * range_over,
     254                         const Stmt * body, const Stmt * else_ )
     255                : Stmt(loc, std::move(labels)), inits(std::move(inits)), range_over(range_over), body(body), else_(else_) {}
    249256
    250257        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.