- File:
-
- 1 edited
-
src/Common/CodeLocationTools.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocationTools.cpp
r71806e0 rb05beaa 208 208 209 209 struct LeafKindVisitor : public ast::Visitor { 210 LeafKind kind;210 LeafKind result; 211 211 212 212 #define VISIT(node_type, return_type) \ 213 213 const ast::return_type * visit( const ast::node_type * ) final { \ 214 kind= LeafKind::node_type; \214 result = LeafKind::node_type; \ 215 215 return nullptr; \ 216 216 } … … 222 222 223 223 LeafKind get_leaf_kind( ast::Node const * node ) { 224 LeafKindVisitor visitor; 225 node->accept( visitor ); 226 return visitor.kind; 224 return ast::Pass<LeafKindVisitor>::read( node ); 227 225 } 228 226
Note:
See TracChangeset
for help on using the changeset viewer.