clang-tools 20.0.0git
|
A Token represents an attribute of a symbol, such as a particular trigram present in the name (used for fuzzy search). More...
#include <Token.h>
Public Types | |
enum class | Kind { Trigram , Scope , ProximityURI , Type , Sentinel } |
Kind specifies Token type which defines semantics for the internal representation. More... | |
Public Member Functions | |
Token (Kind TokenKind, llvm::StringRef Data) | |
bool | operator== (const Token &Other) const |
Friends | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Token &T) |
llvm::hash_code | hash_value (const Token &Token) |
A Token represents an attribute of a symbol, such as a particular trigram present in the name (used for fuzzy search).
Tokens can be used to perform more sophisticated search queries by constructing complex iterator trees.
Definition at line 39 of file index/dex/Token.h.
|
strong |
Kind specifies Token type which defines semantics for the internal representation.
Each Kind has different representation stored in Data field.
Enumerator | |
---|---|
Trigram | Represents trigram used for fuzzy search of unqualified symbol names. Data contains 3 bytes with trigram contents. |
Scope | Scope primitives, e.g. "symbol belongs to namespace foo::bar". Data stroes full scope name, e.g. "foo::bar::baz::" or "" (for global scope). |
ProximityURI | Path Proximity URI to symbol declaration. Data stores path URI of symbol declaration file or its parent. Example: "file:///path/to/clang-tools-extra/clangd/index/SymbolIndex.h" and some amount of its parents. |
Type | Type of symbol (see |
Sentinel | Internal Token type for invalid/special tokens, e.g. empty tokens for llvm::DenseMap. |
Definition at line 48 of file index/dex/Token.h.
|
inline |
Definition at line 72 of file index/dex/Token.h.
|
inline |
Definition at line 75 of file index/dex/Token.h.
|
friend |
Definition at line 105 of file index/dex/Token.h.
|
friend |
Definition at line 79 of file index/dex/Token.h.