22 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TOKEN_H 23 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TOKEN_H 25 #include "llvm/ADT/DenseMap.h" 26 #include "llvm/Support/raw_ostream.h" 64 : Data(Data), TokenKind(TokenKind) {}
80 return llvm::hash_combine(static_cast<int>(Token.
TokenKind), Token.
Data);
91 template <>
struct DenseMapInfo<
clang::clangd::dex::Token> {
friend llvm::hash_code hash_value(const Token &Token)
Some operations such as code completion produce a set of candidates.
static unsigned getHashValue(const clang::clangd::dex::Token &Tag)
Token(Kind TokenKind, llvm::StringRef Data)
friend llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const Token &T)
Represents trigram used for fuzzy search of unqualified symbol names.
A Token represents an attribute of a symbol, such as a particular trigram present in the name (used f...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Kind
Kind specifies Token type which defines semantics for the internal representation.
bool operator==(const Token &Other) const
std::string Data
Representation which is unique among Token with the same Kind.
static bool isEqual(const clang::clangd::dex::Token &LHS, const clang::clangd::dex::Token &RHS)
static clang::clangd::dex::Token getEmptyKey()
Internal Token type for invalid/special tokens, e.g.
static clang::clangd::dex::Token getTombstoneKey()