Tokenize observer-reported type names

The semantic token legend gains a type entry, and the server emits it
for each class name span reported by the observer when it lies in the
open document. The canonical type itself is still not tokenized
because it has no source span. Registered tests cover the legend index,
and a real stdio session decoded the class names as type tokens beside
the function and declaration tokens.
This commit is contained in:
faumaray committed 2026-12-05 23:56:39 +03:00
1 parent 86b9923532
commit 4b534c61ae
7 files changed
+37 -3

No files matched your search

+2
View File
@@ -13,6 +13,8 @@ namespace vls::features::semantic_tokens {
inline constexpr std::uint32_t function_type = 0;
// Bit flag in Token::modifiers, matching the server's advertised legend.
inline constexpr std::uint32_t declaration_modifier = 1;
// Second legend entry: a compiler-proven type name.
inline constexpr std::uint32_t type_type = 1;
struct Token {
std::uint32_t line{}, character{}, length{};