Changeset d3aa55e9 for src/AST/Stmt.hpp


Ignore:
Timestamp:
Jun 27, 2024, 4:42:01 PM (3 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
7552fde
Parents:
d5efcb7
Message:
  1. Disallow implicit conversion from cfa enum to int during on the function call site; 2. implement the reverse enum loop
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    rd5efcb7 rd3aa55e9  
    238238        ptr<Expr> inc;
    239239        ptr<Expr> range_over;
     240        bool is_inc;
    240241        ptr<Stmt> body;
    241242        ptr<Stmt> else_;
     
    251252                        range_over(nullptr), body(body), else_(else_) {}
    252253
    253         ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * range_over,
     254        ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * range_over, bool is_inc,
    254255                         const Stmt * body, const Stmt * else_ )
    255                 : Stmt(loc, std::move(labels)), inits(std::move(inits)), range_over(range_over), body(body), else_(else_) {}
     256                : Stmt(loc, std::move(labels)), inits(std::move(inits)), range_over(range_over), is_inc(is_inc),
     257                body(body), else_(else_) {}
    256258
    257259        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.