summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/SemanticHighlighting.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/SemanticHighlighting.h')
-rw-r--r--clang-tools-extra/clangd/SemanticHighlighting.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/SemanticHighlighting.h b/clang-tools-extra/clangd/SemanticHighlighting.h
index 345c29ecd5c..385db8d2268 100644
--- a/clang-tools-extra/clangd/SemanticHighlighting.h
+++ b/clang-tools-extra/clangd/SemanticHighlighting.h
@@ -25,7 +25,9 @@ namespace clangd {
enum class HighlightingKind {
Variable = 0,
- Function = 1,
+ Function,
+
+ NumKinds,
};
// Contains all information needed for the highlighting a token.
@@ -40,9 +42,9 @@ bool operator==(const HighlightingToken &Lhs, const HighlightingToken &Rhs);
// main AST.
std::vector<HighlightingToken> getSemanticHighlightings(ParsedAST &AST);
-// Gets the TextMate scopes as a double nested array where the
-// SemanticHighlightKind indexes correctly into this vector.
-std::vector<std::vector<std::string>> getTextMateScopeLookupTable();
+/// Converts a HighlightingKind to a corresponding TextMate scope
+/// (https://manual.macromates.com/en/language_grammars).
+llvm::StringRef toTextMateScope(HighlightingKind Kind);
// Convert to LSP's semantic highlighting information.
std::vector<SemanticHighlightingInformation>
OpenPOWER on IntegriCloud