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