Changeset eb779d5 for src/AST/Stmt.hpp


Ignore:
Timestamp:
Oct 9, 2023, 12:55:09 PM (9 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
26dfce5
Parents:
0d49efb
Message:

Implemented corun statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    r0d49efb reb779d5  
    532532};
    533533
     534// Corun Statement
     535class CorunStmt final : public Stmt {
     536  public:
     537        ptr<Stmt> stmt;
     538
     539        CorunStmt( const CodeLocation & loc, const Stmt * stmt, const std::vector<Label> && labels = {} )
     540                : Stmt(loc, std::move(labels)), stmt(stmt) {}
     541
     542        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
     543  private:
     544        CorunStmt * clone() const override { return new CorunStmt{ *this }; }
     545        MUTATE_FRIEND
     546};
     547
    534548} // namespace ast
    535549
Note: See TracChangeset for help on using the changeset viewer.