11 using namespace clang;
17 case NodeKind::TranslationUnit:
18 return OS <<
"TranslationUnit";
19 case NodeKind::TopLevelDeclaration:
20 return OS <<
"TopLevelDeclaration";
21 case NodeKind::CompoundStatement:
22 return OS <<
"CompoundStatement";
24 llvm_unreachable(
"unknown node kind");
28 return llvm::cast_or_null<syntax::Leaf>(
33 return llvm::cast_or_null<syntax::Leaf>(
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, NodeKind K)
For debugging purposes.
NodeKind
A kind of a syntax node, used for implementing casts.
Dataflow Directional Tag Classes.
A leaf node points to a single token inside the expanded token stream.
Defines the clang::TokenKind enum and support functions.
syntax::Node * findChild(NodeRole R)
Find the first node with a corresponding role.