Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip TestCode classification type when computing tokens. #74433

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static async Task<int[]> ComputeSemanticTokensDataAsync(
using var _1 = Classifier.GetPooledList(out var classifiedSpans);
using var _2 = Classifier.GetPooledList(out var updatedClassifiedSpans);

// We either calculate the tokens for the full document span, or the user
// We either calculate the tokens for the full document span, or the user
// can pass in a range from the full document if they wish.
ImmutableArray<TextSpan> textSpans;
if (spans.Length == 0)
Expand Down Expand Up @@ -338,6 +338,10 @@ private static int ComputeNextToken(
// 6. Token modifiers - each set bit will be looked up in SemanticTokensLegend.tokenModifiers
modifierBits |= TokenModifiers.Deprecated;
}
else if (classificationType == ClassificationTypeNames.TestCode)
{
// Skip additive types that are not being converted to token modifiers.
}
else
{
// 7. Token type - looked up in SemanticTokensLegend.tokenTypes (language server defined mapping
Expand Down
Loading