Changes in src/AST/Pass.proto.hpp [a9762dc:3f681b1]
- File:
-
- 1 edited
-
src/AST/Pass.proto.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.proto.hpp
ra9762dc r3f681b1 295 295 FIELD_PTR( at_cleanup, __pass::at_cleanup_t ) 296 296 FIELD_PTR( visitor, ast::Pass<core_t> * const ) 297 FIELD_PTR( location, const CodeLocation * )298 297 299 298 // Remove the macro to make sure we don't clash … … 325 324 static auto on_error (core_t & core, ptr<Decl> & decl, int) -> decltype(core.on_error(decl)) { 326 325 return core.on_error(decl); 327 }328 329 template< typename core_t, typename node_t >330 static auto make_location_guard(core_t & core, node_t * node) -> ValueGuardPtr<const CodeLocation *> {331 if constexpr (std::is_base_of<ParseNode, node_t>::value) {332 const CodeLocation ** p = location(core, 0);333 if(p) {334 ValueGuardPtr<const CodeLocation *> g = { p };335 *p = &node->location;336 return g;337 }338 }339 (void)node;340 return { nullptr };341 326 } 342 327
Note:
See TracChangeset
for help on using the changeset viewer.