9#ifndef LLVM_CLANG_TOOLING_SYNTAX_TOKEN_BUFFER_TOKEN_MANAGER_H
10#define LLVM_CLANG_TOOLING_SYNTAX_TOKEN_BUFFER_TOKEN_MANAGER_H
24 : Tokens(Tokens), LangOpts(LangOpts), SM(SourceMgr) {}
27 llvm::StringLiteral
kind()
const override {
return Kind; }
49 static constexpr llvm::StringLiteral Kind =
"TokenBuffer";
54 std::pair<FileID, ArrayRef<Token>>
55 lexBuffer(std::unique_ptr<llvm::MemoryBuffer> Buffer);
64 llvm::DenseMap<FileID, std::vector<Token>> ExtraTokens;
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
This class handles loading and caching of source files into memory.
Exposes private syntax tree APIs required to implement node synthesis.
A TokenBuffer-powered token manager.
const syntax::Token * getToken(Key I) const
const TokenBuffer & tokenBuffer() const
static bool classof(const TokenManager *N)
TokenBufferTokenManager(const TokenBuffer &Tokens, const LangOptions &LangOpts, SourceManager &SourceMgr)
llvm::StringLiteral kind() const override
Describes what the exact class kind of the TokenManager is.
llvm::StringRef getText(Key I) const override
SourceManager & sourceManager()
const SourceManager & sourceManager() const
A list of tokens obtained by preprocessing a text buffer and operations to map between the expanded a...
Defines interfaces for operating "Token" in the clang syntax-tree.
uintptr_t Key
A key to identify a specific token.
virtual llvm::StringLiteral kind() const =0
Describes what the exact class kind of the TokenManager is.
A token coming directly from a file or from a macro invocation.
llvm::StringRef text(const SourceManager &SM) const
Get the substring covered by the token.
tok::TokenKind kind() const
The JSON file list parser is used to communicate input to InstallAPI.