Changeset 246c245 for src/AST/Stmt.hpp
- Timestamp:
- May 16, 2019, 6:51:18 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8ff178d, d66e7b7
- Parents:
- 9b4f329 (diff), 6f8e87d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Stmt.hpp
r9b4f329 r246c245 10 10 // Created On : Wed May 8 13:00:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 1 5 16:01:00 201913 // Update Count : 212 // Last Modified On : Wed May 16 12:20:00 2019 13 // Update Count : 3 14 14 // 15 15 … … 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 template<typename node_t> friend automutate(const node_t * node);29 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node); 30 30 31 31 namespace ast { … … 86 86 ptr<Expr> expr; 87 87 88 ExprStmt( const CodeLocation & loc, const Expr * e ) : Stmt(loc), expr(e) {} 88 ExprStmt( const CodeLocation& loc, const Expr* e, std::vector<Label>&& labels = {} ) 89 : Stmt(loc, std::move(labels)), expr(e) {} 89 90 90 91 const Stmt * accept( Visitor & v ) const override { return v.visit( this ); } … … 404 405 }; 405 406 406 //=================================================================================================407 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency408 /// remove only if there is a better solution409 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with410 /// forward declarations411 inline void increment( const class Stmt * node, Node::ref_type ref ) { node->increment( ref ); }412 inline void decrement( const class Stmt * node, Node::ref_type ref ) { node->decrement( ref ); }413 inline void increment( const class CompoundStmt * node, Node::ref_type ref ) { node->increment( ref ); }414 inline void decrement( const class CompoundStmt * node, Node::ref_type ref ) { node->decrement( ref ); }415 inline void increment( const class ExprStmt * node, Node::ref_type ref ) { node->increment( ref ); }416 inline void decrement( const class ExprStmt * node, Node::ref_type ref ) { node->decrement( ref ); }417 inline void increment( const class AsmStmt * node, Node::ref_type ref ) { node->increment( ref ); }418 inline void decrement( const class AsmStmt * node, Node::ref_type ref ) { node->decrement( ref ); }419 inline void increment( const class DirectiveStmt * node, Node::ref_type ref ) { node->increment( ref ); }420 inline void decrement( const class DirectiveStmt * node, Node::ref_type ref ) { node->decrement( ref ); }421 inline void increment( const class IfStmt * node, Node::ref_type ref ) { node->increment( ref ); }422 inline void decrement( const class IfStmt * node, Node::ref_type ref ) { node->decrement( ref ); }423 inline void increment( const class WhileStmt * node, Node::ref_type ref ) { node->increment( ref ); }424 inline void decrement( const class WhileStmt * node, Node::ref_type ref ) { node->decrement( ref ); }425 inline void increment( const class ForStmt * node, Node::ref_type ref ) { node->increment( ref ); }426 inline void decrement( const class ForStmt * node, Node::ref_type ref ) { node->decrement( ref ); }427 inline void increment( const class SwitchStmt * node, Node::ref_type ref ) { node->increment( ref ); }428 inline void decrement( const class SwitchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }429 inline void increment( const class CaseStmt * node, Node::ref_type ref ) { node->increment( ref ); }430 inline void decrement( const class CaseStmt * node, Node::ref_type ref ) { node->decrement( ref ); }431 inline void increment( const class BranchStmt * node, Node::ref_type ref ) { node->increment( ref ); }432 inline void decrement( const class BranchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }433 inline void increment( const class ReturnStmt * node, Node::ref_type ref ) { node->increment( ref ); }434 inline void decrement( const class ReturnStmt * node, Node::ref_type ref ) { node->decrement( ref ); }435 inline void increment( const class ThrowStmt * node, Node::ref_type ref ) { node->increment( ref ); }436 inline void decrement( const class ThrowStmt * node, Node::ref_type ref ) { node->decrement( ref ); }437 inline void increment( const class TryStmt * node, Node::ref_type ref ) { node->increment( ref ); }438 inline void decrement( const class TryStmt * node, Node::ref_type ref ) { node->decrement( ref ); }439 inline void increment( const class CatchStmt * node, Node::ref_type ref ) { node->increment( ref ); }440 inline void decrement( const class CatchStmt * node, Node::ref_type ref ) { node->decrement( ref ); }441 inline void increment( const class FinallyStmt * node, Node::ref_type ref ) { node->increment( ref ); }442 inline void decrement( const class FinallyStmt * node, Node::ref_type ref ) { node->decrement( ref ); }443 inline void increment( const class WaitForStmt * node, Node::ref_type ref ) { node->increment( ref ); }444 inline void decrement( const class WaitForStmt * node, Node::ref_type ref ) { node->decrement( ref ); }445 inline void increment( const class WithStmt * node, Node::ref_type ref ) { node->increment( ref ); }446 inline void decrement( const class WithStmt * node, Node::ref_type ref ) { node->decrement( ref ); }447 inline void increment( const class DeclStmt * node, Node::ref_type ref ) { node->increment( ref ); }448 inline void decrement( const class DeclStmt * node, Node::ref_type ref ) { node->decrement( ref ); }449 inline void increment( const class NullStmt * node, Node::ref_type ref ) { node->increment( ref ); }450 inline void decrement( const class NullStmt * node, Node::ref_type ref ) { node->decrement( ref ); }451 inline void increment( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->increment( ref ); }452 inline void decrement( const class ImplicitCtorDtorStmt * node, Node::ref_type ref ) { node->decrement( ref ); }453 454 407 } 455 408
Note: See TracChangeset
for help on using the changeset viewer.