22#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TOKEN_H
23#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_TOKEN_H
25#include "llvm/ADT/Hashing.h"
26#include "llvm/Support/raw_ostream.h"
73 : Data(Data), TokenKind(TokenKind) {}
76 return TokenKind == Other.TokenKind && Data == Other.Data;
80 switch (T.TokenKind) {
106 return llvm::hash_combine(
static_cast<int>(
Token.TokenKind),
Token.Data);
117template <>
struct DenseMapInfo<
clang::clangd::dex::Token> {
127 return hash_value(
Tag);
A Token represents an attribute of a symbol, such as a particular trigram present in the name (used f...
Token(Kind TokenKind, llvm::StringRef Data)
bool operator==(const Token &Other) const
Kind
Kind specifies Token type which defines semantics for the internal representation.
@ ProximityURI
Path Proximity URI to symbol declaration.
@ Scope
Scope primitives, e.g.
@ Sentinel
Internal Token type for invalid/special tokens, e.g.
@ Trigram
Represents trigram used for fuzzy search of unqualified symbol names.
@ Type
Type of symbol (see Symbol::Type).
friend llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const Token &T)
friend llvm::hash_code hash_value(const Token &Token)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Some operations such as code completion produce a set of candidates.
static clang::clangd::dex::Token getTombstoneKey()
static clang::clangd::dex::Token getEmptyKey()
static unsigned getHashValue(const clang::clangd::dex::Token &Tag)
static bool isEqual(const clang::clangd::dex::Token &LHS, const clang::clangd::dex::Token &RHS)