10 using namespace clang;
20 T->prependChildLowLevel(Child, R);
26 auto Tokens = A.
lexBuffer(llvm::MemoryBuffer::getMemBuffer(
29 assert(Tokens.size() == 1);
30 assert(Tokens.front().kind() == K);
33 L->assertInvariants();
43 S->assertInvariants();
Children of an unknown semantic nature, e.g. skipped tokens, comments.
std::pair< FileID, llvm::ArrayRef< syntax::Token > > lexBuffer(std::unique_ptr< llvm::MemoryBuffer > Buffer)
Add Buffer to the underlying source manager, tokenize it and store the resulting tokens.
llvm::BumpPtrAllocator & allocator()
A memory arena for syntax trees.
The no-op statement, i.e. ';'.
clang::syntax::Leaf * createPunctuation(clang::syntax::Arena &A, clang::tok::TokenKind K)
const char * getPunctuatorSpelling(TokenKind Kind) LLVM_READNONE
Determines the spelling of simple punctuation tokens like '!' or '', and returns NULL for literal and...
clang::syntax::EmptyStatement * createEmptyStatement(clang::syntax::Arena &A)
A node that has children and represents a syntactic language construct.
Exposes private syntax tree APIs required to implement node synthesis.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
static void prependChildLowLevel(syntax::Tree *T, syntax::Node *Child, syntax::NodeRole R)
NodeRole
A relation between a parent and child node, e.g.
Dataflow Directional Tag Classes.
A leaf node points to a single token inside the expanded token stream.
static void setCanModify(syntax::Node *N)