exhaustively list semantic token types to exclude

This commit is contained in:
Veikka Tuominen 2023-05-29 01:12:16 +03:00
parent b958b258a3
commit 6471db5274

View File

@ -120,15 +120,28 @@ const Builder = struct {
if (loc.start < self.previous_source_index) return;
switch (token_type) {
.type,
.parameter,
.variable,
.enumMember,
.property,
.errorTag,
.function,
.label,
.namespace,
.@"struct",
.@"enum",
.@"union",
.@"opaque",
=> {},
else => if (self.limited) return,
.parameter,
.variable,
.keyword,
.comment,
.string,
.number,
.operator,
.builtin,
.label,
.keywordLiteral,
=> if (self.limited) return,
}
const delta_text = self.handle.tree.source[self.previous_source_index..loc.start];