Changes in src/AST/Stmt.hpp [c570806:37cdd97]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
rc570806 r37cdd97 27 27 28 28 // Must be included in *all* AST classes; should be #undef'd at the end of the file 29 #define MUTATE_FRIEND \ 30 template<typename node_t> friend node_t * mutate(const node_t * node); \ 31 template<typename node_t> friend node_t * shallowCopy(const node_t * node); 29 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node); 32 30 33 31 namespace ast { … … 344 342 }; 345 343 344 /// Suspend statement 345 class SuspendStmt final : public Stmt { 346 public: 347 ptr<CompoundStmt> then; 348 enum Type { None, Coroutine, Generator } type = None; 349 350 SuspendStmt( const CodeLocation & loc, const CompoundStmt * then, Type type, std::vector<Label> && labels = {} ) 351 : Stmt(loc, std::move(labels)), then(then), type(type) {} 352 353 const Stmt * accept( Visitor & v ) const override { return v.visit( this ); } 354 private: 355 SuspendStmt * clone() const override { return new SuspendStmt{ *this }; } 356 MUTATE_FRIEND 357 }; 358 346 359 /// Wait for concurrency statement `when (...) waitfor (... , ...) ... timeout(...) ... else ...` 347 360 class WaitForStmt final : public Stmt { … … 399 412 class ImplicitCtorDtorStmt final : public Stmt { 400 413 public: 401 ptr<Stmt> callStmt;414 readonly<Stmt> callStmt; 402 415 403 416 ImplicitCtorDtorStmt( const CodeLocation & loc, const Stmt * callStmt,
Note:
See TracChangeset
for help on using the changeset viewer.