- File:
-
- 1 edited
-
src/Common/CodeLocationTools.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocationTools.cpp
rb05beaa rc86b08d 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 result;212 LeafKind kind; 211 213 212 214 #define VISIT(node_type, return_type) \ 213 215 const ast::return_type * visit( const ast::node_type * ) final { \ 214 result= LeafKind::node_type; \216 kind = LeafKind::node_type; \ 215 217 return nullptr; \ 216 218 } … … 222 224 223 225 LeafKind get_leaf_kind( ast::Node const * node ) { 224 return ast::Pass<LeafKindVisitor>::read( node ); 226 LeafKindVisitor visitor; 227 node->accept( visitor ); 228 return visitor.kind; 225 229 } 226 230
Note:
See TracChangeset
for help on using the changeset viewer.