Changeset e0115286 for src/AST/ParseNode.hpp
- Timestamp:
- May 10, 2019, 3:00:41 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:
- 2a5e8a6
- Parents:
- 1f93c2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/ParseNode.hpp
r1f93c2c re0115286 22 22 namespace ast { 23 23 24 25 26 27 24 /// AST node with an included source location 25 class ParseNode : public Node { 26 public: 27 CodeLocation location; 28 28 29 30 31 29 // Default constructor is deliberately omitted, all ParseNodes must have a location. 30 // Escape hatch if needed is to explicitly pass a default-constructed location, but 31 // this should be used sparingly. 32 32 33 33 ParseNode( const CodeLocation& loc ) : Node(), location(loc) {} 34 34 35 36 35 ParseNode( const ParseNode& o ) = default; 36 }; 37 37 38 39 //================================================================================================= 40 /// This disgusting and giant piece of boiler-plate is here to solve a cyclic dependency 41 /// remove only if there is a better solution 42 /// The problem is that ast::ptr< ... > uses increment/decrement which won't work well with 43 /// forward declarations 44 inline void increment( const class ParseNode * node, Node::ref_type ref ) { node->increment( ref ); } 45 inline void decrement( const class ParseNode * node, Node::ref_type ref ) { node->decrement( ref ); } 38 46 } 39 47
Note: See TracChangeset
for help on using the changeset viewer.