Changeset 24d6572 for src/Common/CodeLocationTools.cpp
- Timestamp:
- Jun 12, 2023, 2:45:32 PM (2 years ago)
- Branches:
- ast-experimental, master
- Children:
- 62d62db
- Parents:
- 34b4268 (diff), 251ce80 (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/Common/CodeLocationTools.cpp
r34b4268 r24d6572 128 128 macro(FinallyClause, FinallyClause) \ 129 129 macro(SuspendStmt, Stmt) \ 130 macro(WhenClause, WhenClause) \ 130 131 macro(WaitForStmt, Stmt) \ 131 132 macro(WaitForClause, WaitForClause) \ 133 macro(WaitUntilStmt, Stmt) \ 132 134 macro(WithStmt, Decl) \ 133 135 macro(NullStmt, NullStmt) \ … … 208 210 209 211 struct LeafKindVisitor : public ast::Visitor { 210 LeafKind kind;212 LeafKind result; 211 213 212 214 #define VISIT(node_type, return_type) \ 213 215 const ast::return_type * visit( const ast::node_type * ) final { \ 214 kind= LeafKind::node_type; \216 result = LeafKind::node_type; \ 215 217 return nullptr; \ 216 218 } … … 222 224 223 225 LeafKind get_leaf_kind( ast::Node const * node ) { 224 LeafKindVisitor visitor; 225 node->accept( visitor ); 226 return visitor.kind; 226 return ast::Pass<LeafKindVisitor>::read( node ); 227 227 } 228 228
Note:
See TracChangeset
for help on using the changeset viewer.