- File:
-
- 1 edited
-
src/Common/CodeLocationTools.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocationTools.cpp
rc86b08d rb05beaa 128 128 macro(FinallyClause, FinallyClause) \ 129 129 macro(SuspendStmt, Stmt) \ 130 macro(WhenClause, WhenClause) \131 130 macro(WaitForStmt, Stmt) \ 132 131 macro(WaitForClause, WaitForClause) \ 133 macro(WaitUntilStmt, Stmt) \134 132 macro(WithStmt, Decl) \ 135 133 macro(NullStmt, NullStmt) \ … … 210 208 211 209 struct LeafKindVisitor : public ast::Visitor { 212 LeafKind kind;210 LeafKind result; 213 211 214 212 #define VISIT(node_type, return_type) \ 215 213 const ast::return_type * visit( const ast::node_type * ) final { \ 216 kind= LeafKind::node_type; \214 result = LeafKind::node_type; \ 217 215 return nullptr; \ 218 216 } … … 224 222 225 223 LeafKind get_leaf_kind( ast::Node const * node ) { 226 LeafKindVisitor visitor; 227 node->accept( visitor ); 228 return visitor.kind; 224 return ast::Pass<LeafKindVisitor>::read( node ); 229 225 } 230 226
Note:
See TracChangeset
for help on using the changeset viewer.