1189 references to ClassificationTypeNames
Microsoft.AspNetCore.App.Analyzers (12)
RouteEmbeddedLanguage\RoutePatternClassifier.cs (12)
64
AddClassification(node.OpenBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
65
AddClassification(node.TextToken,
ClassificationTypeNames
.RegexCharacterClass);
66
AddClassification(node.CloseBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
71
AddClassification(node.OpenBraceToken,
ClassificationTypeNames
.RegexCharacterClass);
72
AddClassification(node.CloseBraceToken,
ClassificationTypeNames
.RegexCharacterClass);
92
AddClassification(node.AsteriskToken,
ClassificationTypeNames
.RegexAnchor);
107
AddClassification(node.ColonToken,
ClassificationTypeNames
.RegexCharacterClass);
112
AddClassification(node.OpenParenToken,
ClassificationTypeNames
.RegexCharacterClass);
113
AddClassification(node.CloseParenToken,
ClassificationTypeNames
.RegexCharacterClass);
118
AddClassification(node.ArgumentToken,
ClassificationTypeNames
.RegexGrouping);
123
AddClassification(node.QuestionMarkToken,
ClassificationTypeNames
.RegexAnchor);
128
AddClassification(node.EqualsToken,
ClassificationTypeNames
.RegexCharacterClass);
Microsoft.AspNetCore.App.Analyzers.Test (57)
RouteEmbeddedLanguage\Infrastructure\FormattedClassifications.cs (48)
20
=> New(text,
ClassificationTypeNames
.StructName);
24
=> New(text,
ClassificationTypeNames
.EnumName);
28
=> New(text,
ClassificationTypeNames
.InterfaceName);
32
=> New(text,
ClassificationTypeNames
.ClassName);
36
=> New(text,
ClassificationTypeNames
.RecordClassName);
40
=> New(text,
ClassificationTypeNames
.RecordStructName);
44
=> New(text,
ClassificationTypeNames
.DelegateName);
48
=> New(text,
ClassificationTypeNames
.TypeParameterName);
52
=> New(text,
ClassificationTypeNames
.NamespaceName);
56
=> New(text,
ClassificationTypeNames
.LabelName);
60
=> New(text,
ClassificationTypeNames
.FieldName);
64
=> New(text,
ClassificationTypeNames
.EnumMemberName);
68
=> New(text,
ClassificationTypeNames
.ConstantName);
72
=> New(text,
ClassificationTypeNames
.LocalName);
76
=> New(text,
ClassificationTypeNames
.ParameterName);
80
=> New(text,
ClassificationTypeNames
.MethodName);
84
=> New(text,
ClassificationTypeNames
.ExtensionMethodName);
88
=> New(text,
ClassificationTypeNames
.PropertyName);
92
=> New(text,
ClassificationTypeNames
.EventName);
96
=> New(text,
ClassificationTypeNames
.StaticSymbol);
100
=> New(text,
ClassificationTypeNames
.StringLiteral);
104
=> New(text,
ClassificationTypeNames
.VerbatimStringLiteral);
108
=> New(text,
ClassificationTypeNames
.StringEscapeCharacter);
112
=> New(text,
ClassificationTypeNames
.Keyword);
116
=> New(text,
ClassificationTypeNames
.Punctuation);
120
=> New(text,
ClassificationTypeNames
.ControlKeyword);
124
=> New(text,
ClassificationTypeNames
.WhiteSpace);
128
=> New(text,
ClassificationTypeNames
.Text);
132
=> New(text,
ClassificationTypeNames
.NumericLiteral);
136
=> New(text,
ClassificationTypeNames
.PreprocessorKeyword);
140
=> New(text,
ClassificationTypeNames
.PreprocessorText);
144
=> New(text,
ClassificationTypeNames
.Identifier);
148
=> New(text,
ClassificationTypeNames
.ExcludedCode);
152
=> New(text,
ClassificationTypeNames
.Comment);
156
=> New(text,
ClassificationTypeNames
.NumericLiteral);
159
= New("_",
ClassificationTypeNames
.Punctuation);
163
=> New(text,
ClassificationTypeNames
.ModuleName);
167
=> New(text,
ClassificationTypeNames
.XmlLiteralName);
171
=> New(text,
ClassificationTypeNames
.XmlLiteralText);
175
=> New(text,
ClassificationTypeNames
.XmlLiteralProcessingInstruction);
179
=> New(text,
ClassificationTypeNames
.XmlLiteralEmbeddedExpression);
183
=> New(text,
ClassificationTypeNames
.XmlLiteralDelimiter);
187
=> New(text,
ClassificationTypeNames
.XmlLiteralComment);
191
=> New(text,
ClassificationTypeNames
.XmlLiteralCDataSection);
195
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeValue);
199
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeQuotes);
203
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeName);
207
=> New(text,
ClassificationTypeNames
.XmlLiteralEntityReference);
RouteEmbeddedLanguage\Infrastructure\FormattedClassifications.Regex.cs (9)
16
public static FormattedClassification Anchor(string value) => New(value,
ClassificationTypeNames
.RegexAnchor);
19
public static FormattedClassification Grouping(string value) => New(value,
ClassificationTypeNames
.RegexGrouping);
22
public static FormattedClassification OtherEscape(string value) => New(value,
ClassificationTypeNames
.RegexOtherEscape);
25
public static FormattedClassification SelfEscapedCharacter(string value) => New(value,
ClassificationTypeNames
.RegexSelfEscapedCharacter);
28
public static FormattedClassification Alternation(string value) => New(value,
ClassificationTypeNames
.RegexAlternation);
31
public static FormattedClassification CharacterClass(string value) => New(value,
ClassificationTypeNames
.RegexCharacterClass);
34
public static FormattedClassification Text(string value) => New(value,
ClassificationTypeNames
.RegexText);
37
public static FormattedClassification Quantifier(string value) => New(value,
ClassificationTypeNames
.RegexQuantifier);
40
public static FormattedClassification Comment(string value) => New(value,
ClassificationTypeNames
.RegexComment);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
EventHookup\EventHookupSessionManager.cs (3)
87
new ClassifiedTextRun(
ClassificationTypeNames
.MethodName, eventName, ClassifiedTextRunStyle.UseClassificationFont),
88
new ClassifiedTextRun(
ClassificationTypeNames
.Punctuation, ";", ClassifiedTextRunStyle.UseClassificationFont),
89
new ClassifiedTextRun(
ClassificationTypeNames
.Text, CSharpEditorResources.Press_TAB_to_insert),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (35)
Classification\SemanticClassifierTests_TestMarkup.cs (2)
108
var nonTestCodeSpans = actual.Where(s => s.ClassificationType !=
ClassificationTypeNames
.TestCode).OrderBy((t1, t2) => t1.TextSpan.Start - t2.TextSpan.Start).ToImmutableArray();
109
var testCodeSpans = actual.Where(s => s.ClassificationType ==
ClassificationTypeNames
.TestCode).OrderBy((t1, t2) => t1.TextSpan.Start - t2.TextSpan.Start).ToImmutableArray();
Classification\SyntacticClassifierTests.cs (27)
5735
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(0, 3)),
5736
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentText, new TextSpan(3, 1)),
5737
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(4, 1)),
5738
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentName, new TextSpan(5, 5)),
5739
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeName, new TextSpan(11, 4)),
5740
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(15, 1)),
5741
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes, new TextSpan(16, 1)),
5742
new ClassifiedSpan(
ClassificationTypeNames
.Identifier, new TextSpan(17, 5)),
5743
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes, new TextSpan(22, 1)),
5744
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(23, 1)),
5745
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(24, 2)),
5746
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentName, new TextSpan(26, 5)),
5747
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(31, 1))
5765
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(2, 3)),
5766
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentText, new TextSpan(5, 1)),
5767
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(6, 1)),
5768
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentName, new TextSpan(7, 5)),
5769
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(14, 3)),
5770
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeName, new TextSpan(18, 4)),
5771
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(22, 1)),
5772
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes, new TextSpan(23, 1)),
5773
new ClassifiedSpan(
ClassificationTypeNames
.Identifier, new TextSpan(24, 5)),
5774
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes, new TextSpan(29, 1)),
5775
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(30, 1)),
5776
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(31, 2)),
5777
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentName, new TextSpan(33, 5)),
5778
new ClassifiedSpan(
ClassificationTypeNames
.XmlDocCommentDelimiter, new TextSpan(38, 1))
SignatureHelp\GenericNameFullyWrittenSignatureHelpProviderTests.cs (6)
923
ClassificationTypeNames
.Text,
924
ClassificationTypeNames
.WhiteSpace,
925
ClassificationTypeNames
.WhiteSpace,
926
ClassificationTypeNames
.WhiteSpace,
927
ClassificationTypeNames
.Text,
928
ClassificationTypeNames
.WhiteSpace))
Microsoft.CodeAnalysis.CSharp.Features (3)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (3)
58
context.AddClassification(
ClassificationTypeNames
.TestCodeMarkdown, span);
80
ClassificationTypeNames
.TestCode,
90
ClassificationTypeNames
.TestCode,
Microsoft.CodeAnalysis.CSharp.Workspaces (194)
Classification\ClassificationHelpers.cs (50)
34
return
ClassificationTypeNames
.ControlKeyword;
39
return
ClassificationTypeNames
.Keyword;
52
?
ClassificationTypeNames
.VerbatimStringLiteral
53
:
ClassificationTypeNames
.StringLiteral;
57
return
ClassificationTypeNames
.NumericLiteral;
202
return
ClassificationTypeNames
.DelegateName;
206
return
ClassificationTypeNames
.TypeParameterName;
211
return
ClassificationTypeNames
.ExtensionMethodName;
214
return
ClassificationTypeNames
.ExtensionMethodName;
216
return
ClassificationTypeNames
.MethodName;
228
return
ClassificationTypeNames
.MethodName;
232
return
ClassificationTypeNames
.PropertyName;
236
return
ClassificationTypeNames
.EnumMemberName;
240
return
ClassificationTypeNames
.LocalName;
247
FieldDeclarationSyntax fieldDeclaration => fieldDeclaration.Modifiers.Any(SyntaxKind.ConstKeyword) ?
ClassificationTypeNames
.ConstantName :
ClassificationTypeNames
.FieldName,
248
LocalDeclarationStatementSyntax localDeclarationStatement => localDeclarationStatement.IsConst ?
ClassificationTypeNames
.ConstantName :
ClassificationTypeNames
.LocalName,
249
EventFieldDeclarationSyntax _ =>
ClassificationTypeNames
.EventName,
250
_ =>
ClassificationTypeNames
.LocalName,
255
return
ClassificationTypeNames
.LocalName;
259
return
ClassificationTypeNames
.ParameterName;
263
return
ClassificationTypeNames
.LocalName;
267
return
ClassificationTypeNames
.EventName;
271
return
ClassificationTypeNames
.Keyword;
275
return
ClassificationTypeNames
.NamespaceName;
279
return
ClassificationTypeNames
.NamespaceName;
283
return
ClassificationTypeNames
.LabelName;
287
return
ClassificationTypeNames
.Identifier;
294
SyntaxKind.ClassDeclaration =>
ClassificationTypeNames
.ClassName,
295
SyntaxKind.InterfaceDeclaration =>
ClassificationTypeNames
.InterfaceName,
296
SyntaxKind.RecordDeclaration =>
ClassificationTypeNames
.RecordClassName,
297
SyntaxKind.RecordStructDeclaration =>
ClassificationTypeNames
.RecordStructName,
298
SyntaxKind.StructDeclaration =>
ClassificationTypeNames
.StructName,
301
SyntaxKind.UnionDeclaration =>
ClassificationTypeNames
.StructName,
345
SyntaxKind.ClassDeclaration =>
ClassificationTypeNames
.ClassName,
346
SyntaxKind.EnumDeclaration =>
ClassificationTypeNames
.EnumName,
347
SyntaxKind.StructDeclaration =>
ClassificationTypeNames
.StructName,
348
SyntaxKind.UnionDeclaration =>
ClassificationTypeNames
.StructName,
349
SyntaxKind.InterfaceDeclaration =>
ClassificationTypeNames
.InterfaceName,
350
SyntaxKind.RecordDeclaration =>
ClassificationTypeNames
.RecordClassName,
351
SyntaxKind.RecordStructDeclaration =>
ClassificationTypeNames
.RecordStructName,
372
return
ClassificationTypeNames
.Punctuation;
384
return
ClassificationTypeNames
.Punctuation;
391
return
ClassificationTypeNames
.Operator;
395
return
ClassificationTypeNames
.Punctuation;
526
var wasKeyword = classificationType ==
ClassificationTypeNames
.Keyword;
527
var wasIdentifier = classificationType ==
ClassificationTypeNames
.Identifier;
562
isKeyword ?
ClassificationTypeNames
.Keyword :
ClassificationTypeNames
.Identifier, span);
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (3)
30
result.Add(new ClassifiedSpan(syntax.Span,
ClassificationTypeNames
.Keyword));
41
result.Add(new ClassifiedSpan(parameter.Identifier.Span,
ClassificationTypeNames
.Keyword));
51
result.Add(new ClassifiedSpan(syntax.Span,
ClassificationTypeNames
.Keyword));
Classification\SyntaxClassification\DocCommentCodeBlockClassifier.cs (3)
59
result.Add(new(token.Span,
ClassificationTypeNames
.XmlDocCommentText));
122
result.Add(new(
ClassificationTypeNames
.TestCodeMarkdown, span));
166
ClassificationTypeNames
.TestCode,
Classification\SyntaxClassification\FunctionPointerUnmanagedCallingConventionClassifier.cs (1)
33
result.Add(new(
ClassificationTypeNames
.ClassName, callingConvention.Name.Span));
Classification\SyntaxClassification\NameSyntaxClassifier.cs (23)
78
if (classifiedSpan.ClassificationType !=
ClassificationTypeNames
.Keyword)
114
result.Add(new ClassifiedSpan(set.First().TextSpan,
ClassificationTypeNames
.StaticSymbol));
145
classifiedSpan = new ClassifiedSpan(name.Span,
ClassificationTypeNames
.NamespaceName);
153
classifiedSpan = new ClassifiedSpan(name.Span,
ClassificationTypeNames
.Keyword);
160
classifiedSpan = new ClassifiedSpan(name.Span,
ClassificationTypeNames
.Keyword);
168
classifiedSpan = new ClassifiedSpan(name.Span,
ClassificationTypeNames
.Keyword);
175
classifiedSpan = new ClassifiedSpan(name.Span,
ClassificationTypeNames
.Keyword);
204
classifiedSpan = new ClassifiedSpan(token.Span,
ClassificationTypeNames
.PropertyName);
208
classifiedSpan = new ClassifiedSpan(token.Span,
ClassificationTypeNames
.EventName);
217
classifiedSpan = new ClassifiedSpan(token.Span,
ClassificationTypeNames
.ParameterName);
225
classifiedSpan = new ClassifiedSpan(token.Span,
ClassificationTypeNames
.LabelName);
237
return fieldSymbol.ContainingType.IsEnumType() ?
ClassificationTypeNames
.EnumMemberName :
ClassificationTypeNames
.ConstantName;
240
return
ClassificationTypeNames
.FieldName;
246
?
ClassificationTypeNames
.ConstantName
247
:
ClassificationTypeNames
.LocalName;
256
return methodSymbol.ContainingType?.GetClassification() ??
ClassificationTypeNames
.MethodName;
262
return
ClassificationTypeNames
.ExtensionMethodName;
267
return
ClassificationTypeNames
.ExtensionMethodName;
269
return
ClassificationTypeNames
.MethodName;
297
result.Add(new ClassifiedSpan(token.Span,
ClassificationTypeNames
.Keyword));
312
result.Add(new ClassifiedSpan(name.Identifier.Span,
ClassificationTypeNames
.Keyword));
328
result.Add(new(name.Span,
ClassificationTypeNames
.Keyword));
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
50
result.Add(new ClassifiedSpan(operatorSpan,
ClassificationTypeNames
.OperatorOverloaded));
Classification\SyntaxClassification\UsingDirectiveSyntaxClassifier.cs (1)
57
result.Add(new ClassifiedSpan(token.Span,
ClassificationTypeNames
.NamespaceName));
Classification\Worker.cs (6)
134
AddClassification(TextSpan.FromBounds(token.Span.End - "u8".Length, token.Span.End),
ClassificationTypeNames
.Keyword);
145
AddClassification(span,
ClassificationTypeNames
.StaticSymbol);
210
AddClassification(trivia,
ClassificationTypeNames
.Comment);
227
AddClassification(trivia,
ClassificationTypeNames
.XmlDocCommentDelimiter);
273
=> AddClassification(trivia,
ClassificationTypeNames
.Comment);
291
AddClassification(trivia,
ClassificationTypeNames
.ExcludedCode);
Classification\Worker_DocumentationComments.cs (29)
77
AddClassification(t,
ClassificationTypeNames
.XmlDocCommentText);
110
AddClassification(span,
ClassificationTypeNames
.XmlDocCommentDelimiter);
124
AddClassification(span,
ClassificationTypeNames
.XmlDocCommentDelimiter);
161
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentEntityReference);
169
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentText);
172
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentAttributeValue);
175
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentComment);
178
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentCDataSection);
181
AddClassification(token,
ClassificationTypeNames
.XmlDocCommentProcessingInstruction);
191
XmlAttributeSyntax =>
ClassificationTypeNames
.XmlDocCommentAttributeName,
192
XmlProcessingInstructionSyntax =>
ClassificationTypeNames
.XmlDocCommentProcessingInstruction,
193
_ =>
ClassificationTypeNames
.XmlDocCommentName,
223
AddXmlClassification(node.LessThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
231
AddXmlClassification(node.GreaterThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
236
AddXmlClassification(node.LessThanSlashToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
238
AddXmlClassification(node.GreaterThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
243
AddXmlClassification(node.LessThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
251
AddXmlClassification(node.SlashGreaterThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
257
AddXmlClassification(attribute.EqualsToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
258
AddXmlClassification(attribute.StartQuoteToken,
ClassificationTypeNames
.XmlDocCommentAttributeQuotes);
279
AddXmlClassification(attribute.EndQuoteToken,
ClassificationTypeNames
.XmlDocCommentAttributeQuotes);
320
AddClassification(token, isControlKeyword ?
ClassificationTypeNames
.ControlKeyword :
ClassificationTypeNames
.Keyword);
328
AddXmlClassification(node.LessThanExclamationMinusMinusToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
330
AddXmlClassification(node.MinusMinusGreaterThanToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
335
AddXmlClassification(node.StartCDataToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
337
AddXmlClassification(node.EndCDataToken,
ClassificationTypeNames
.XmlDocCommentDelimiter);
342
AddXmlClassification(node.StartProcessingInstructionToken,
ClassificationTypeNames
.XmlDocCommentProcessingInstruction);
345
AddXmlClassification(node.EndProcessingInstructionToken,
ClassificationTypeNames
.XmlDocCommentProcessingInstruction);
Classification\Worker_Preprocesser.cs (77)
108
AddClassification(trivia,
ClassificationTypeNames
.Comment);
112
AddClassification(trivia,
ClassificationTypeNames
.PreprocessorText);
126
AddClassification(literal.Token,
ClassificationTypeNames
.Keyword);
131
AddClassification(identifier.Identifier,
ClassificationTypeNames
.Identifier);
136
AddClassification(parenExpression.OpenParenToken,
ClassificationTypeNames
.Punctuation);
138
AddClassification(parenExpression.CloseParenToken,
ClassificationTypeNames
.Punctuation);
143
AddClassification(prefixExpression.OperatorToken,
ClassificationTypeNames
.Operator);
150
AddClassification(binaryExpression.OperatorToken,
ClassificationTypeNames
.Operator);
157
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
158
AddClassification(node.IfKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
165
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
166
AddClassification(node.ElifKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
173
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
174
AddClassification(node.ElseKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
180
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
181
AddClassification(node.EndIfKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
187
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
188
AddClassification(node.ErrorKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
194
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
195
AddClassification(node.WarningKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
201
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
202
AddClassification(node.RegionKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
208
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
209
AddClassification(node.EndRegionKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
215
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
216
AddClassification(node.DefineKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
217
AddClassification(node.Name,
ClassificationTypeNames
.Identifier);
223
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
224
AddClassification(node.UndefKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
225
AddClassification(node.Name,
ClassificationTypeNames
.Identifier);
231
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
232
AddClassification(node.Identifier,
ClassificationTypeNames
.PreprocessorKeyword);
238
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
239
AddClassification(node.LineKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
245
AddClassification(node.Line,
ClassificationTypeNames
.PreprocessorKeyword);
248
AddClassification(node.Line,
ClassificationTypeNames
.NumericLiteral);
252
AddOptionalClassification(node.File,
ClassificationTypeNames
.StringLiteral);
258
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
259
AddClassification(node.LineKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
261
AddClassification(node.MinusToken,
ClassificationTypeNames
.Operator);
263
AddOptionalClassification(node.CharacterOffset,
ClassificationTypeNames
.NumericLiteral);
264
AddOptionalClassification(node.File,
ClassificationTypeNames
.StringLiteral);
278
AddClassification(node.OpenParenToken,
ClassificationTypeNames
.Punctuation);
279
AddClassification(node.Line,
ClassificationTypeNames
.NumericLiteral);
280
AddClassification(node.CommaToken,
ClassificationTypeNames
.Punctuation);
281
AddClassification(node.Character,
ClassificationTypeNames
.NumericLiteral);
282
AddClassification(node.CloseParenToken,
ClassificationTypeNames
.Punctuation);
287
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
288
AddClassification(node.PragmaKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
289
AddClassification(node.ChecksumKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
290
AddClassification(node.File,
ClassificationTypeNames
.StringLiteral);
291
AddClassification(node.Guid,
ClassificationTypeNames
.StringLiteral);
292
AddClassification(node.Bytes,
ClassificationTypeNames
.StringLiteral);
298
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
299
AddClassification(node.PragmaKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
300
AddClassification(node.WarningKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
301
AddClassification(node.DisableOrRestoreKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
318
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
319
AddClassification(node.ReferenceKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
320
AddClassification(node.File,
ClassificationTypeNames
.StringLiteral);
326
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
327
AddClassification(node.LoadKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
328
AddClassification(node.File,
ClassificationTypeNames
.StringLiteral);
338
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
339
AddClassification(node.ColonToken,
ClassificationTypeNames
.PreprocessorKeyword);
349
AddClassification(node.Content,
ClassificationTypeNames
.PreprocessorKeyword);
356
AddClassification(new TextSpan(node.Content.SpanStart, firstWhitespaceIndex),
ClassificationTypeNames
.PreprocessorKeyword);
385
AddClassification(new TextSpan(node.Content.SpanStart + nameStart, contentText.Length - nameStart),
ClassificationTypeNames
.StringLiteral);
411
AddClassification(new TextSpan(contentStart + separatorIndex, 1),
ClassificationTypeNames
.Punctuation);
418
AddClassification(new TextSpan(contentStart + valueIndex, contentText.Length - valueIndex),
ClassificationTypeNames
.StringLiteral);
436
AddClassification(new TextSpan(contentStart + segmentStart, index - segmentStart),
ClassificationTypeNames
.Identifier);
441
AddClassification(new TextSpan(contentStart + index, 1),
ClassificationTypeNames
.Punctuation);
449
AddClassification(new TextSpan(contentStart + segmentStart, end - segmentStart),
ClassificationTypeNames
.Identifier);
455
AddClassification(node.HashToken,
ClassificationTypeNames
.PreprocessorKeyword);
456
AddClassification(node.NullableKeyword,
ClassificationTypeNames
.PreprocessorKeyword);
457
AddClassification(node.SettingToken,
ClassificationTypeNames
.PreprocessorKeyword);
458
AddClassification(node.TargetToken,
ClassificationTypeNames
.PreprocessorKeyword);
Microsoft.CodeAnalysis.EditorFeatures (308)
Classification\ClassificationTypeDefinitions.cs (83)
18
[Name(
ClassificationTypeNames
.PreprocessorText)]
24
[Name(
ClassificationTypeNames
.Punctuation)]
30
[Name(
ClassificationTypeNames
.VerbatimStringLiteral)]
35
[Name(
ClassificationTypeNames
.StringEscapeCharacter)]
43
[Name(
ClassificationTypeNames
.ControlKeyword)]
50
[Name(
ClassificationTypeNames
.ClassName)]
56
[Name(
ClassificationTypeNames
.RecordClassName)]
57
[BaseDefinition(
ClassificationTypeNames
.ClassName)]
62
[Name(
ClassificationTypeNames
.RecordStructName)]
63
[BaseDefinition(
ClassificationTypeNames
.StructName)]
68
[Name(
ClassificationTypeNames
.DelegateName)]
74
[Name(
ClassificationTypeNames
.EnumName)]
80
[Name(
ClassificationTypeNames
.InterfaceName)]
86
[Name(
ClassificationTypeNames
.ModuleName)]
92
[Name(
ClassificationTypeNames
.StructName)]
98
[Name(
ClassificationTypeNames
.TypeParameterName)]
106
[Name(
ClassificationTypeNames
.ArrayName)]
107
[BaseDefinition(
ClassificationTypeNames
.ClassName)]
114
[Name(
ClassificationTypeNames
.PointerName)]
115
[BaseDefinition(
ClassificationTypeNames
.StructName)]
122
[Name(
ClassificationTypeNames
.FunctionPointerName)]
123
[BaseDefinition(
ClassificationTypeNames
.StructName)]
129
[Name(
ClassificationTypeNames
.TestCode)]
133
[Name(
ClassificationTypeNames
.TestCodeMarkdown)]
144
[Name(
ClassificationTypeNames
.FieldName)]
150
[Name(
ClassificationTypeNames
.EnumMemberName)]
156
[Name(
ClassificationTypeNames
.ConstantName)]
162
[Name(
ClassificationTypeNames
.LocalName)]
168
[Name(
ClassificationTypeNames
.ParameterName)]
174
[Name(
ClassificationTypeNames
.MethodName)]
180
[Name(
ClassificationTypeNames
.ExtensionMethodName)]
181
[BaseDefinition(
ClassificationTypeNames
.MethodName)]
186
[Name(
ClassificationTypeNames
.PropertyName)]
192
[Name(
ClassificationTypeNames
.EventName)]
198
[Name(
ClassificationTypeNames
.NamespaceName)]
204
[Name(
ClassificationTypeNames
.LabelName)]
211
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeName)]
217
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes)]
223
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeValue)]
229
[Name(
ClassificationTypeNames
.XmlDocCommentCDataSection)]
235
[Name(
ClassificationTypeNames
.XmlDocCommentComment)]
241
[Name(
ClassificationTypeNames
.XmlDocCommentDelimiter)]
247
[Name(
ClassificationTypeNames
.XmlDocCommentEntityReference)]
253
[Name(
ClassificationTypeNames
.XmlDocCommentName)]
259
[Name(
ClassificationTypeNames
.XmlDocCommentProcessingInstruction)]
265
[Name(
ClassificationTypeNames
.XmlDocCommentText)]
272
[Name(
ClassificationTypeNames
.RegexComment)]
277
[Name(
ClassificationTypeNames
.RegexText)]
282
[Name(
ClassificationTypeNames
.RegexCharacterClass)]
287
[Name(
ClassificationTypeNames
.RegexQuantifier)]
292
[Name(
ClassificationTypeNames
.RegexAnchor)]
297
[Name(
ClassificationTypeNames
.RegexAlternation)]
302
[Name(
ClassificationTypeNames
.RegexOtherEscape)]
307
[Name(
ClassificationTypeNames
.RegexSelfEscapedCharacter)]
312
[Name(
ClassificationTypeNames
.RegexGrouping)]
320
[Name(
ClassificationTypeNames
.JsonComment)]
325
[Name(
ClassificationTypeNames
.JsonNumber)]
330
[Name(
ClassificationTypeNames
.JsonString)]
335
[Name(
ClassificationTypeNames
.JsonKeyword)]
340
[Name(
ClassificationTypeNames
.JsonText)]
345
[Name(
ClassificationTypeNames
.JsonOperator)]
350
[Name(
ClassificationTypeNames
.JsonPunctuation)]
355
[Name(
ClassificationTypeNames
.JsonArray)]
360
[Name(
ClassificationTypeNames
.JsonObject)]
365
[Name(
ClassificationTypeNames
.JsonPropertyName)]
366
[BaseDefinition(
ClassificationTypeNames
.MethodName)]
370
[Name(
ClassificationTypeNames
.JsonConstructorName)]
371
[BaseDefinition(
ClassificationTypeNames
.StructName)]
378
[Name(
ClassificationTypeNames
.XmlLiteralAttributeName)]
384
[Name(
ClassificationTypeNames
.XmlLiteralAttributeQuotes)]
390
[Name(
ClassificationTypeNames
.XmlLiteralAttributeValue)]
396
[Name(
ClassificationTypeNames
.XmlLiteralCDataSection)]
402
[Name(
ClassificationTypeNames
.XmlLiteralComment)]
408
[Name(
ClassificationTypeNames
.XmlLiteralDelimiter)]
414
[Name(
ClassificationTypeNames
.XmlLiteralEmbeddedExpression)]
420
[Name(
ClassificationTypeNames
.XmlLiteralEntityReference)]
426
[Name(
ClassificationTypeNames
.XmlLiteralName)]
432
[Name(
ClassificationTypeNames
.XmlLiteralProcessingInstruction)]
438
[Name(
ClassificationTypeNames
.XmlLiteralText)]
445
[Name(
ClassificationTypeNames
.ReassignedVariable)]
452
[Name(
ClassificationTypeNames
.ObsoleteSymbol)]
459
[Name(
ClassificationTypeNames
.StaticSymbol)]
468
[Name(
ClassificationTypeNames
.OperatorOverloaded)]
Classification\ClassificationTypeFormatDefinitions.cs (217)
23
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.PreprocessorText)]
24
[Name(
ClassificationTypeNames
.PreprocessorText)]
41
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.Punctuation)]
42
[Name(
ClassificationTypeNames
.Punctuation)]
60
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.VerbatimStringLiteral)]
61
[Name(
ClassificationTypeNames
.VerbatimStringLiteral)]
77
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.StringEscapeCharacter)]
78
[Name(
ClassificationTypeNames
.StringEscapeCharacter)]
79
[Order(After =
ClassificationTypeNames
.StringLiteral)]
80
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
99
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ControlKeyword)]
100
[Name(
ClassificationTypeNames
.ControlKeyword)]
119
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.OperatorOverloaded)]
120
[Name(
ClassificationTypeNames
.OperatorOverloaded)]
138
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ReassignedVariable)]
139
[Name(
ClassificationTypeNames
.ReassignedVariable)]
157
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ObsoleteSymbol)]
158
[Name(
ClassificationTypeNames
.ObsoleteSymbol)]
176
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.StaticSymbol)]
177
[Name(
ClassificationTypeNames
.StaticSymbol)]
214
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ClassName)]
215
[Name(
ClassificationTypeNames
.ClassName)]
218
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
234
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RecordClassName)]
235
[Name(
ClassificationTypeNames
.RecordClassName)]
238
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
253
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RecordStructName)]
254
[Name(
ClassificationTypeNames
.RecordStructName)]
257
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
272
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.DelegateName)]
273
[Name(
ClassificationTypeNames
.DelegateName)]
276
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
292
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.EnumName)]
293
[Name(
ClassificationTypeNames
.EnumName)]
296
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
312
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.InterfaceName)]
313
[Name(
ClassificationTypeNames
.InterfaceName)]
316
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
332
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ModuleName)]
333
[Name(
ClassificationTypeNames
.ModuleName)]
336
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
351
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.StructName)]
352
[Name(
ClassificationTypeNames
.StructName)]
355
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
371
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.TypeParameterName)]
372
[Name(
ClassificationTypeNames
.TypeParameterName)]
375
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
391
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ArrayName)]
392
[Name(
ClassificationTypeNames
.ArrayName)]
395
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
410
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.PointerName)]
411
[Name(
ClassificationTypeNames
.PointerName)]
414
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
429
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.FunctionPointerName)]
430
[Name(
ClassificationTypeNames
.FunctionPointerName)]
433
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
449
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.FieldName)]
450
[Name(
ClassificationTypeNames
.FieldName)]
453
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
466
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.EnumMemberName)]
467
[Name(
ClassificationTypeNames
.EnumMemberName)]
470
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
483
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ConstantName)]
484
[Name(
ClassificationTypeNames
.ConstantName)]
487
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
500
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.LocalName)]
501
[Name(
ClassificationTypeNames
.LocalName)]
504
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
520
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ParameterName)]
521
[Name(
ClassificationTypeNames
.ParameterName)]
524
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
540
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.MethodName)]
541
[Name(
ClassificationTypeNames
.MethodName)]
544
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
560
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.ExtensionMethodName)]
561
[Name(
ClassificationTypeNames
.ExtensionMethodName)]
564
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
580
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.PropertyName)]
581
[Name(
ClassificationTypeNames
.PropertyName)]
584
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
597
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.EventName)]
598
[Name(
ClassificationTypeNames
.EventName)]
613
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.NamespaceName)]
614
[Name(
ClassificationTypeNames
.NamespaceName)]
629
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.LabelName)]
630
[Name(
ClassificationTypeNames
.LabelName)]
633
[Order(Before =
ClassificationTypeNames
.StaticSymbol)]
647
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentAttributeName)]
648
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeName)]
665
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentAttributeQuotes)]
666
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes)]
685
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentAttributeValue)]
686
[Name(
ClassificationTypeNames
.XmlDocCommentAttributeValue)]
703
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentCDataSection)]
704
[Name(
ClassificationTypeNames
.XmlDocCommentCDataSection)]
721
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentComment)]
722
[Name(
ClassificationTypeNames
.XmlDocCommentComment)]
739
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentDelimiter)]
740
[Name(
ClassificationTypeNames
.XmlDocCommentDelimiter)]
757
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentEntityReference)]
758
[Name(
ClassificationTypeNames
.XmlDocCommentEntityReference)]
775
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentName)]
776
[Name(
ClassificationTypeNames
.XmlDocCommentName)]
793
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentProcessingInstruction)]
794
[Name(
ClassificationTypeNames
.XmlDocCommentProcessingInstruction)]
811
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlDocCommentText)]
812
[Name(
ClassificationTypeNames
.XmlDocCommentText)]
829
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.TestCode)]
830
[Name(
ClassificationTypeNames
.TestCode)]
831
[Order(After =
ClassificationTypeNames
.StringLiteral)]
832
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
847
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.TestCodeMarkdown)]
848
[Name(
ClassificationTypeNames
.TestCodeMarkdown)]
849
[Order(After =
ClassificationTypeNames
.StringLiteral)]
850
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
867
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexComment)]
868
[Name(
ClassificationTypeNames
.RegexComment)]
869
[Order(After =
ClassificationTypeNames
.StringLiteral)]
870
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
885
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexCharacterClass)]
886
[Name(
ClassificationTypeNames
.RegexCharacterClass)]
887
[Order(After =
ClassificationTypeNames
.StringLiteral)]
888
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
903
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexAnchor)]
904
[Name(
ClassificationTypeNames
.RegexAnchor)]
905
[Order(After =
ClassificationTypeNames
.StringLiteral)]
906
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
921
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexQuantifier)]
922
[Name(
ClassificationTypeNames
.RegexQuantifier)]
923
[Order(After =
ClassificationTypeNames
.StringLiteral)]
924
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
939
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexGrouping)]
940
[Name(
ClassificationTypeNames
.RegexGrouping)]
941
[Order(After =
ClassificationTypeNames
.StringLiteral)]
942
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
957
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexAlternation)]
958
[Name(
ClassificationTypeNames
.RegexAlternation)]
959
[Order(After =
ClassificationTypeNames
.StringLiteral)]
960
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
975
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexText)]
976
[Name(
ClassificationTypeNames
.RegexText)]
977
[Order(After =
ClassificationTypeNames
.StringLiteral)]
978
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
993
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexSelfEscapedCharacter)]
994
[Name(
ClassificationTypeNames
.RegexSelfEscapedCharacter)]
995
[Order(After =
ClassificationTypeNames
.StringLiteral)]
996
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1015
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.RegexOtherEscape)]
1016
[Name(
ClassificationTypeNames
.RegexOtherEscape)]
1017
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1018
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1036
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonComment)]
1037
[Name(
ClassificationTypeNames
.JsonComment)]
1038
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1039
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1050
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonNumber)]
1051
[Name(
ClassificationTypeNames
.JsonNumber)]
1052
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1053
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1064
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonString)]
1065
[Name(
ClassificationTypeNames
.JsonString)]
1066
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1067
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1078
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonKeyword)]
1079
[Name(
ClassificationTypeNames
.JsonKeyword)]
1080
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1081
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1092
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonText)]
1093
[Name(
ClassificationTypeNames
.JsonText)]
1094
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1095
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1106
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonOperator)]
1107
[Name(
ClassificationTypeNames
.JsonOperator)]
1108
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1109
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1120
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonPunctuation)]
1121
[Name(
ClassificationTypeNames
.JsonPunctuation)]
1122
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1123
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1134
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonObject)]
1135
[Name(
ClassificationTypeNames
.JsonObject)]
1136
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1137
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1148
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonArray)]
1149
[Name(
ClassificationTypeNames
.JsonArray)]
1150
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1151
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1162
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonPropertyName)]
1163
[Name(
ClassificationTypeNames
.JsonPropertyName)]
1164
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1165
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1176
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.JsonConstructorName)]
1177
[Name(
ClassificationTypeNames
.JsonConstructorName)]
1178
[Order(After =
ClassificationTypeNames
.StringLiteral)]
1179
[Order(After =
ClassificationTypeNames
.VerbatimStringLiteral)]
1193
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralAttributeName)]
1194
[Name(
ClassificationTypeNames
.XmlLiteralAttributeName)]
1210
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralAttributeQuotes)]
1211
[Name(
ClassificationTypeNames
.XmlLiteralAttributeQuotes)]
1227
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralAttributeValue)]
1228
[Name(
ClassificationTypeNames
.XmlLiteralAttributeValue)]
1244
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralCDataSection)]
1245
[Name(
ClassificationTypeNames
.XmlLiteralCDataSection)]
1261
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralComment)]
1262
[Name(
ClassificationTypeNames
.XmlLiteralComment)]
1278
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralDelimiter)]
1279
[Name(
ClassificationTypeNames
.XmlLiteralDelimiter)]
1295
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralEmbeddedExpression)]
1296
[Name(
ClassificationTypeNames
.XmlLiteralEmbeddedExpression)]
1313
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralEntityReference)]
1314
[Name(
ClassificationTypeNames
.XmlLiteralEntityReference)]
1330
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralName)]
1331
[Name(
ClassificationTypeNames
.XmlLiteralName)]
1347
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralProcessingInstruction)]
1348
[Name(
ClassificationTypeNames
.XmlLiteralProcessingInstruction)]
1364
[ClassificationType(ClassificationTypeNames =
ClassificationTypeNames
.XmlLiteralText)]
1365
[Name(
ClassificationTypeNames
.XmlLiteralText)]
Classification\TotalClassificationTaggerProvider.cs (4)
194
if (currentSyntactic.Tag.ClassificationType.Classification is not
ClassificationTypeNames
.StringLiteral and not
ClassificationTypeNames
.VerbatimStringLiteral)
204
if (currentSyntactic.Tag.ClassificationType.Classification is not
ClassificationTypeNames
.Comment and not
ClassificationTypeNames
.ExcludedCode)
QuickInfo\OnTheFlyDocsView.xaml.cs (2)
93
? ToUIElement(new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement([new ClassifiedTextRun(
ClassificationTypeNames
.Text, EditorFeaturesResources.Describe_is_unavailable_since_the_referenced_document_is_excluded_by_your_organization)])))
271
new ContainerElement(ContainerElementStyle.Wrapped, new ClassifiedTextElement([new ClassifiedTextRun(
ClassificationTypeNames
.Text, text)])));
Shared\Utilities\ClassificationTypeMap.cs (2)
37
var fields = typeof(
ClassificationTypeNames
).GetFields();
60
return type ?? GetClassificationTypeWorker(
ClassificationTypeNames
.Text);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (90)
Classification\AbstractClassifierTests.cs (1)
65
actual = actual.WhereAsArray(a => a.ClassificationType !=
ClassificationTypeNames
.TestCode);
Classification\FormattedClassifications.cs (54)
19
=> New(text,
ClassificationTypeNames
.StructName);
23
=> New(text,
ClassificationTypeNames
.EnumName);
27
=> New(text,
ClassificationTypeNames
.InterfaceName);
31
=> New(text,
ClassificationTypeNames
.ClassName);
35
=> New(text,
ClassificationTypeNames
.RecordClassName);
39
=> New(text,
ClassificationTypeNames
.RecordStructName);
43
=> New(text,
ClassificationTypeNames
.DelegateName);
47
=> New(text,
ClassificationTypeNames
.TypeParameterName);
51
=> New(text,
ClassificationTypeNames
.ArrayName);
55
=> New(text,
ClassificationTypeNames
.PointerName);
59
=> New(text,
ClassificationTypeNames
.FunctionPointerName);
63
=> New(text,
ClassificationTypeNames
.NamespaceName);
67
=> New(text,
ClassificationTypeNames
.LabelName);
71
=> New(text,
ClassificationTypeNames
.FieldName);
75
=> New(text,
ClassificationTypeNames
.EnumMemberName);
79
=> New(text,
ClassificationTypeNames
.ConstantName);
83
=> New(text,
ClassificationTypeNames
.LocalName);
87
=> New(text,
ClassificationTypeNames
.ParameterName);
91
=> New(text,
ClassificationTypeNames
.MethodName);
95
=> New(text,
ClassificationTypeNames
.ExtensionMethodName);
99
=> New(text,
ClassificationTypeNames
.PropertyName);
103
=> New(text,
ClassificationTypeNames
.EventName);
107
=> New(text,
ClassificationTypeNames
.ObsoleteSymbol);
111
=> New(text,
ClassificationTypeNames
.StaticSymbol);
115
=> New(text,
ClassificationTypeNames
.StringLiteral);
119
=> New(text,
ClassificationTypeNames
.VerbatimStringLiteral);
123
=> New(text,
ClassificationTypeNames
.StringEscapeCharacter);
127
=> New(text,
ClassificationTypeNames
.Keyword);
131
=> New(text,
ClassificationTypeNames
.Punctuation);
135
=> New(text,
ClassificationTypeNames
.ControlKeyword);
139
=> New(text,
ClassificationTypeNames
.WhiteSpace);
143
=> New(text,
ClassificationTypeNames
.Text);
147
=> New(text,
ClassificationTypeNames
.NumericLiteral);
151
=> New(text,
ClassificationTypeNames
.PreprocessorKeyword);
155
=> New(text,
ClassificationTypeNames
.PreprocessorText);
159
=> New(text,
ClassificationTypeNames
.Identifier);
163
=> New(text,
ClassificationTypeNames
.ExcludedCode);
167
=> New(text,
ClassificationTypeNames
.Comment);
171
=> New(text,
ClassificationTypeNames
.NumericLiteral);
174
= New("_",
ClassificationTypeNames
.Punctuation);
178
=> New(text,
ClassificationTypeNames
.ModuleName);
182
=> New(text,
ClassificationTypeNames
.XmlLiteralName);
186
=> New(text,
ClassificationTypeNames
.XmlLiteralText);
190
=> New(text,
ClassificationTypeNames
.XmlLiteralProcessingInstruction);
194
=> New(text,
ClassificationTypeNames
.XmlLiteralEmbeddedExpression);
198
=> New(text,
ClassificationTypeNames
.XmlLiteralDelimiter);
202
=> New(text,
ClassificationTypeNames
.XmlLiteralComment);
206
=> New(text,
ClassificationTypeNames
.XmlLiteralCDataSection);
210
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeValue);
214
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeQuotes);
218
=> New(text,
ClassificationTypeNames
.XmlLiteralAttributeName);
222
=> New(text,
ClassificationTypeNames
.XmlLiteralEntityReference);
226
=> New(text,
ClassificationTypeNames
.TestCode);
230
=> New(text,
ClassificationTypeNames
.TestCodeMarkdown);
Classification\FormattedClassifications.Json.cs (11)
15
public static FormattedClassification Array(string value) => New(value,
ClassificationTypeNames
.JsonArray);
18
public static FormattedClassification Object(string value) => New(value,
ClassificationTypeNames
.JsonObject);
21
public static FormattedClassification PropertyName(string value) => New(value,
ClassificationTypeNames
.JsonPropertyName);
24
public static FormattedClassification Punctuation(string value) => New(value,
ClassificationTypeNames
.JsonPunctuation);
27
public static FormattedClassification Number(string value) => New(value,
ClassificationTypeNames
.JsonNumber);
30
public static FormattedClassification Operator(string value) => New(value,
ClassificationTypeNames
.JsonOperator);
33
public static FormattedClassification Keyword(string value) => New(value,
ClassificationTypeNames
.JsonKeyword);
36
public static FormattedClassification ConstructorName(string value) => New(value,
ClassificationTypeNames
.JsonConstructorName);
39
public static FormattedClassification Comment(string value) => New(value,
ClassificationTypeNames
.JsonComment);
42
public static FormattedClassification Text(string value) => New(value,
ClassificationTypeNames
.JsonText);
45
public static FormattedClassification String(string value) => New(value,
ClassificationTypeNames
.JsonString);
Classification\FormattedClassifications.Operators.cs (1)
18
=> new(text,
ClassificationTypeNames
.Operator);
Classification\FormattedClassifications.OverloadedOperators.cs (1)
18
=> new(text,
ClassificationTypeNames
.OperatorOverloaded);
Classification\FormattedClassifications.Punctuation.cs (1)
18
=> new(text,
ClassificationTypeNames
.Punctuation);
Classification\FormattedClassifications.Regex.cs (9)
15
public static FormattedClassification Anchor(string value) => New(value,
ClassificationTypeNames
.RegexAnchor);
18
public static FormattedClassification Grouping(string value) => New(value,
ClassificationTypeNames
.RegexGrouping);
21
public static FormattedClassification OtherEscape(string value) => New(value,
ClassificationTypeNames
.RegexOtherEscape);
24
public static FormattedClassification SelfEscapedCharacter(string value) => New(value,
ClassificationTypeNames
.RegexSelfEscapedCharacter);
27
public static FormattedClassification Alternation(string value) => New(value,
ClassificationTypeNames
.RegexAlternation);
30
public static FormattedClassification CharacterClass(string value) => New(value,
ClassificationTypeNames
.RegexCharacterClass);
33
public static FormattedClassification Text(string value) => New(value,
ClassificationTypeNames
.RegexText);
36
public static FormattedClassification Quantifier(string value) => New(value,
ClassificationTypeNames
.RegexQuantifier);
39
public static FormattedClassification Comment(string value) => New(value,
ClassificationTypeNames
.RegexComment);
Classification\FormattedClassifications.XmlDoc.cs (10)
18
=> New(text,
ClassificationTypeNames
.XmlDocCommentAttributeName);
22
=> New(text,
ClassificationTypeNames
.XmlDocCommentAttributeQuotes);
26
=> New(text,
ClassificationTypeNames
.XmlDocCommentAttributeValue);
30
=> New(text,
ClassificationTypeNames
.XmlDocCommentCDataSection);
34
=> New(text,
ClassificationTypeNames
.XmlDocCommentComment);
38
=> New(text,
ClassificationTypeNames
.XmlDocCommentDelimiter);
42
=> New(text,
ClassificationTypeNames
.XmlDocCommentEntityReference);
46
=> New(text,
ClassificationTypeNames
.XmlDocCommentName);
50
=> New(text,
ClassificationTypeNames
.XmlDocCommentProcessingInstruction);
54
=> New(text,
ClassificationTypeNames
.XmlDocCommentText);
QuickInfo\ToolTipAssert.cs (2)
221
foreach (var field in typeof(
ClassificationTypeNames
).GetFields())
228
return $"{nameof(
ClassificationTypeNames
)}.{field.Name}";
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Workspaces\ClassificationTypeNamesTests.cs (6)
21
=> typeof(
ClassificationTypeNames
)
25
public static IEnumerable<object[]> AllClassificationTypeNames => typeof(
ClassificationTypeNames
).GetAllFields().Where(
37
Assert.True(classificationType != null, $"{nameof(
ClassificationTypeNames
)}.{fieldName} has value \"{classificationTypeName}\", but no matching {nameof(ClassificationTypeDefinition)} was exported.");
42
=> Assert.True(
ClassificationTypeNames
.AllTypeNames.Contains(fieldName), $"Missing token type {fieldName}.");
46
=> Assert.Equal(
ClassificationTypeNames
.AllTypeNames.Distinct(),
ClassificationTypeNames
.AllTypeNames);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Editor\Shared\Utilities\FSharpClassificationTypeMap.cs (2)
30
var fields = typeof(
ClassificationTypeNames
).GetFields();
51
return type ?? GetClassificationTypeWorker(
ClassificationTypeNames
.Text);
Microsoft.CodeAnalysis.Features (112)
ClassifiedSpansAndHighlightSpanFactory.cs (3)
83
new ClassifiedSpan(
ClassificationTypeNames
.Text, TextSpan.FromBounds(widenedSpan.Start, narrowSpan.Start)),
84
new ClassifiedSpan(
ClassificationTypeNames
.Text, narrowSpan),
85
new ClassifiedSpan(
ClassificationTypeNames
.Text, TextSpan.FromBounds(narrowSpan.End, widenedSpan.End)),
Common\TaggedText.cs (31)
155
TextTags.Keyword =>
ClassificationTypeNames
.Keyword,
156
TextTags.Class =>
ClassificationTypeNames
.ClassName,
157
TextTags.Delegate =>
ClassificationTypeNames
.DelegateName,
158
TextTags.Enum =>
ClassificationTypeNames
.EnumName,
159
TextTags.Interface =>
ClassificationTypeNames
.InterfaceName,
160
TextTags.Module =>
ClassificationTypeNames
.ModuleName,
161
TextTags.Struct =>
ClassificationTypeNames
.StructName,
162
TextTags.TypeParameter =>
ClassificationTypeNames
.TypeParameterName,
163
TextTags.Field =>
ClassificationTypeNames
.FieldName,
164
TextTags.Event =>
ClassificationTypeNames
.EventName,
165
TextTags.Label =>
ClassificationTypeNames
.LabelName,
166
TextTags.Local =>
ClassificationTypeNames
.LocalName,
167
TextTags.Method =>
ClassificationTypeNames
.MethodName,
168
TextTags.Namespace =>
ClassificationTypeNames
.NamespaceName,
169
TextTags.Parameter =>
ClassificationTypeNames
.ParameterName,
170
TextTags.Property =>
ClassificationTypeNames
.PropertyName,
171
TextTags.ExtensionMethod =>
ClassificationTypeNames
.ExtensionMethodName,
172
TextTags.EnumMember =>
ClassificationTypeNames
.EnumMemberName,
173
TextTags.Constant =>
ClassificationTypeNames
.ConstantName,
174
TextTags.Alias or TextTags.Assembly or TextTags.ErrorType or TextTags.RangeVariable =>
ClassificationTypeNames
.Identifier,
175
TextTags.NumericLiteral =>
ClassificationTypeNames
.NumericLiteral,
176
TextTags.StringLiteral =>
ClassificationTypeNames
.StringLiteral,
177
TextTags.Space or TextTags.LineBreak =>
ClassificationTypeNames
.WhiteSpace,
178
TextTags.Operator =>
ClassificationTypeNames
.Operator,
179
TextTags.Punctuation =>
ClassificationTypeNames
.Punctuation,
180
TextTags.AnonymousTypeIndicator or TextTags.Text =>
ClassificationTypeNames
.Text,
181
TextTags.Record =>
ClassificationTypeNames
.RecordClassName,
182
TextTags.RecordStruct =>
ClassificationTypeNames
.RecordStructName,
184
TextTags.ContainerStart or TextTags.ContainerEnd or TextTags.CodeBlockStart or TextTags.CodeBlockEnd =>
ClassificationTypeNames
.WhiteSpace,
211
if (classificationTypeName is
ClassificationTypeNames
.Punctuation or
212
ClassificationTypeNames
.WhiteSpace)
EmbeddedLanguages\Classification\AbstractFallbackEmbeddedLanguageClassifier.cs (1)
50
context.AddClassification(
ClassificationTypeNames
.StringEscapeCharacter, vc.Span);
EmbeddedLanguages\Json\LanguageServices\JsonClassifier.cs (17)
94
context.AddClassification(
ClassificationTypeNames
.JsonPunctuation, token.GetSpan());
108
context.AddClassification(
ClassificationTypeNames
.JsonComment, GetSpan(trivia.VirtualChars));
129
AddClassification(node.OpenBracketToken,
ClassificationTypeNames
.JsonArray);
130
AddClassification(node.CloseBracketToken,
ClassificationTypeNames
.JsonArray);
135
AddClassification(node.OpenBraceToken,
ClassificationTypeNames
.JsonObject);
136
AddClassification(node.CloseBraceToken,
ClassificationTypeNames
.JsonObject);
141
AddClassification(node.NameToken,
ClassificationTypeNames
.JsonPropertyName);
142
AddClassification(node.ColonToken,
ClassificationTypeNames
.JsonPunctuation);
147
AddClassification(node.NewKeyword,
ClassificationTypeNames
.JsonKeyword);
148
AddClassification(node.NameToken,
ClassificationTypeNames
.JsonConstructorName);
149
AddClassification(node.OpenParenToken,
ClassificationTypeNames
.JsonPunctuation);
150
AddClassification(node.CloseParenToken,
ClassificationTypeNames
.JsonPunctuation);
161
AddClassification(literalToken,
ClassificationTypeNames
.JsonNumber);
165
AddClassification(literalToken,
ClassificationTypeNames
.JsonString);
174
AddClassification(literalToken,
ClassificationTypeNames
.JsonKeyword);
178
AddClassification(literalToken,
ClassificationTypeNames
.JsonText);
185
AddClassification(node.MinusToken,
ClassificationTypeNames
.JsonOperator);
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (38)
100
context.AddClassification(
ClassificationTypeNames
.RegexComment, GetSpan(trivia.VirtualChars));
142
=> AddClassification(node.DotToken,
ClassificationTypeNames
.RegexCharacterClass);
146
AddClassification(node.OpenBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
147
AddClassification(node.CloseBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
152
AddClassification(node.OpenBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
153
AddClassification(node.CaretToken,
ClassificationTypeNames
.RegexCharacterClass);
154
AddClassification(node.CloseBracketToken,
ClassificationTypeNames
.RegexCharacterClass);
158
=> AddClassification(node.MinusToken,
ClassificationTypeNames
.RegexCharacterClass);
161
=> AddClassification(node.MinusToken,
ClassificationTypeNames
.RegexCharacterClass);
164
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexCharacterClass);
167
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexCharacterClass);
174
=> AddClassification(node.AsteriskToken,
ClassificationTypeNames
.RegexQuantifier);
177
=> AddClassification(node.PlusToken,
ClassificationTypeNames
.RegexQuantifier);
180
=> AddClassification(node.QuestionToken,
ClassificationTypeNames
.RegexQuantifier);
183
=> AddClassification(node.QuestionToken,
ClassificationTypeNames
.RegexQuantifier);
187
AddClassification(node.OpenBraceToken,
ClassificationTypeNames
.RegexQuantifier);
188
AddClassification(node.FirstNumberToken,
ClassificationTypeNames
.RegexQuantifier);
189
AddClassification(node.CloseBraceToken,
ClassificationTypeNames
.RegexQuantifier);
194
AddClassification(node.OpenBraceToken,
ClassificationTypeNames
.RegexQuantifier);
195
AddClassification(node.FirstNumberToken,
ClassificationTypeNames
.RegexQuantifier);
196
AddClassification(node.CommaToken,
ClassificationTypeNames
.RegexQuantifier);
197
AddClassification(node.CloseBraceToken,
ClassificationTypeNames
.RegexQuantifier);
202
AddClassification(node.OpenBraceToken,
ClassificationTypeNames
.RegexQuantifier);
203
AddClassification(node.FirstNumberToken,
ClassificationTypeNames
.RegexQuantifier);
204
AddClassification(node.CommaToken,
ClassificationTypeNames
.RegexQuantifier);
205
AddClassification(node.SecondNumberToken,
ClassificationTypeNames
.RegexQuantifier);
206
AddClassification(node.CloseBraceToken,
ClassificationTypeNames
.RegexQuantifier);
254
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexGrouping);
257
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexGrouping);
260
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexGrouping);
268
AddClassification(child.Token,
ClassificationTypeNames
.RegexGrouping);
290
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexOtherEscape);
297
=> AddClassification(node.AnchorToken,
ClassificationTypeNames
.RegexAnchor);
300
=> ClassifyWholeNode(node,
ClassificationTypeNames
.RegexAnchor);
305
=> AddClassification(node.TextToken,
ClassificationTypeNames
.RegexText);
310
AddClassification(node.SequenceList.NodesAndTokens[i].Token,
ClassificationTypeNames
.RegexAlternation);
315
?
ClassificationTypeNames
.RegexSelfEscapedCharacter
316
:
ClassificationTypeNames
.RegexOtherEscape);
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
150
ClassificationTypeNames
.WhiteSpace,
QuickInfo\Presentation\TaggedTextExtensions.cs (1)
238
=> new(
ClassificationTypeNames
.Text, text);
SpellCheck\AbstractSpellCheckSpanService.cs (20)
216
case
ClassificationTypeNames
.ClassName:
217
case
ClassificationTypeNames
.RecordClassName:
218
case
ClassificationTypeNames
.DelegateName:
219
case
ClassificationTypeNames
.EnumName:
220
case
ClassificationTypeNames
.InterfaceName:
221
case
ClassificationTypeNames
.ModuleName:
222
case
ClassificationTypeNames
.StructName:
223
case
ClassificationTypeNames
.RecordStructName:
224
case
ClassificationTypeNames
.TypeParameterName:
225
case
ClassificationTypeNames
.FieldName:
226
case
ClassificationTypeNames
.EnumMemberName:
227
case
ClassificationTypeNames
.ConstantName:
228
case
ClassificationTypeNames
.LocalName:
229
case
ClassificationTypeNames
.ParameterName:
230
case
ClassificationTypeNames
.MethodName:
231
case
ClassificationTypeNames
.ExtensionMethodName:
232
case
ClassificationTypeNames
.PropertyName:
233
case
ClassificationTypeNames
.EventName:
234
case
ClassificationTypeNames
.NamespaceName:
235
case
ClassificationTypeNames
.LabelName:
Microsoft.CodeAnalysis.LanguageServer.Protocol (92)
Handler\SemanticTokens\CustomLspSemanticTokenNames.cs (62)
12
/// Maps <see cref="
ClassificationTypeNames
"/> to LSP compatible semantic token names.
89
[
ClassificationTypeNames
.ExcludedCode] = ExcludedCode,
90
[
ClassificationTypeNames
.ControlKeyword] = KeywordControl,
91
[
ClassificationTypeNames
.OperatorOverloaded] = OperatorOverloaded,
92
[
ClassificationTypeNames
.WhiteSpace] = Whitespace,
93
[
ClassificationTypeNames
.Text] = Text,
94
[
ClassificationTypeNames
.PreprocessorText] = PreprocessorText,
95
[
ClassificationTypeNames
.Punctuation] = Punctuation,
96
[
ClassificationTypeNames
.VerbatimStringLiteral] = StringVerbatim,
97
[
ClassificationTypeNames
.StringEscapeCharacter] = StringEscapeCharacter,
98
[
ClassificationTypeNames
.ArrayName] = ArrayName,
99
[
ClassificationTypeNames
.PointerName] = PointerName,
100
[
ClassificationTypeNames
.FunctionPointerName] = FunctionPointerName,
101
[
ClassificationTypeNames
.RecordClassName] = RecordClassName,
102
[
ClassificationTypeNames
.DelegateName] = DelegateName,
103
[
ClassificationTypeNames
.ModuleName] = ModuleName,
104
[
ClassificationTypeNames
.RecordStructName] = RecordStructName,
105
[
ClassificationTypeNames
.FieldName] = FieldName,
106
[
ClassificationTypeNames
.ConstantName] = ConstantName,
107
[
ClassificationTypeNames
.ExtensionMethodName] = ExtensionMethodName,
109
[
ClassificationTypeNames
.XmlDocCommentAttributeName] = XmlDocCommentAttributeName,
110
[
ClassificationTypeNames
.XmlDocCommentAttributeQuotes] = XmlDocCommentAttributeQuotes,
111
[
ClassificationTypeNames
.XmlDocCommentAttributeValue] = XmlDocCommentAttributeValue,
112
[
ClassificationTypeNames
.XmlDocCommentCDataSection] = XmlDocCommentCDataSection,
113
[
ClassificationTypeNames
.XmlDocCommentComment] = XmlDocCommentComment,
114
[
ClassificationTypeNames
.XmlDocCommentDelimiter] = XmlDocCommentDelimiter,
115
[
ClassificationTypeNames
.XmlDocCommentEntityReference] = XmlDocCommentEntityReference,
116
[
ClassificationTypeNames
.XmlDocCommentName] = XmlDocCommentName,
117
[
ClassificationTypeNames
.XmlDocCommentProcessingInstruction] = XmlDocCommentProcessingInstruction,
118
[
ClassificationTypeNames
.XmlDocCommentText] = XmlDocCommentText,
120
[
ClassificationTypeNames
.XmlLiteralAttributeName] = XmlLiteralAttributeName,
121
[
ClassificationTypeNames
.XmlLiteralAttributeQuotes] = XmlLiteralAttributeQuotes,
122
[
ClassificationTypeNames
.XmlLiteralAttributeValue] = XmlLiteralAttributeValue,
123
[
ClassificationTypeNames
.XmlLiteralCDataSection] = XmlLiteralCDataSection,
124
[
ClassificationTypeNames
.XmlLiteralComment] = XmlLiteralComment,
125
[
ClassificationTypeNames
.XmlLiteralDelimiter] = XmlLiteralDelimiter,
126
[
ClassificationTypeNames
.XmlLiteralEmbeddedExpression] = XmlLiteralEmbeddedExpression,
127
[
ClassificationTypeNames
.XmlLiteralEntityReference] = XmlLiteralEntityReference,
128
[
ClassificationTypeNames
.XmlLiteralName] = XmlLiteralName,
129
[
ClassificationTypeNames
.XmlLiteralProcessingInstruction] = XmlLiteralProcessingInstruction,
130
[
ClassificationTypeNames
.XmlLiteralText] = XmlLiteralText,
132
[
ClassificationTypeNames
.RegexComment] = RegexComment,
133
[
ClassificationTypeNames
.RegexCharacterClass] = RegexCharacterClass,
134
[
ClassificationTypeNames
.RegexAnchor] = RegexAnchor,
135
[
ClassificationTypeNames
.RegexQuantifier] = RegexQuantifier,
136
[
ClassificationTypeNames
.RegexGrouping] = RegexGrouping,
137
[
ClassificationTypeNames
.RegexAlternation] = RegexAlternation,
138
[
ClassificationTypeNames
.RegexText] = RegexText,
139
[
ClassificationTypeNames
.RegexSelfEscapedCharacter] = RegexSelfEscapedCharacter,
140
[
ClassificationTypeNames
.RegexOtherEscape] = RegexOtherEscape,
142
[
ClassificationTypeNames
.JsonComment] = JsonComment,
143
[
ClassificationTypeNames
.JsonNumber] = JsonNumber,
144
[
ClassificationTypeNames
.JsonString] = JsonString,
145
[
ClassificationTypeNames
.JsonKeyword] = JsonKeyword,
146
[
ClassificationTypeNames
.JsonText] = JsonText,
147
[
ClassificationTypeNames
.JsonOperator] = JsonOperator,
148
[
ClassificationTypeNames
.JsonPunctuation] = JsonPunctuation,
149
[
ClassificationTypeNames
.JsonArray] = JsonArray,
150
[
ClassificationTypeNames
.JsonObject] = JsonObject,
151
[
ClassificationTypeNames
.JsonPropertyName] = JsonPropertyName,
152
[
ClassificationTypeNames
.JsonConstructorName] = JsonConstructorName,
154
[
ClassificationTypeNames
.TestCodeMarkdown] = TestCodeMarkdown,
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
142
if (s.ClassificationType ==
ClassificationTypeNames
.Text)
Handler\SemanticTokens\SemanticTokensSchema.cs (29)
25
[
ClassificationTypeNames
.Comment] = SemanticTokenTypes.Comment,
26
[
ClassificationTypeNames
.Identifier] = SemanticTokenTypes.Variable,
27
[
ClassificationTypeNames
.Keyword] = SemanticTokenTypes.Keyword,
28
[
ClassificationTypeNames
.NumericLiteral] = SemanticTokenTypes.Number,
29
[
ClassificationTypeNames
.Operator] = SemanticTokenTypes.Operator,
30
[
ClassificationTypeNames
.StringLiteral] = SemanticTokenTypes.String,
40
[
ClassificationTypeNames
.ClassName] = SemanticTokenTypes.Class,
41
[
ClassificationTypeNames
.StructName] = SemanticTokenTypes.Struct,
42
[
ClassificationTypeNames
.NamespaceName] = SemanticTokenTypes.Namespace,
43
[
ClassificationTypeNames
.EnumName] = SemanticTokenTypes.Enum,
44
[
ClassificationTypeNames
.InterfaceName] = SemanticTokenTypes.Interface,
45
[
ClassificationTypeNames
.TypeParameterName] = SemanticTokenTypes.TypeParameter,
46
[
ClassificationTypeNames
.ParameterName] = SemanticTokenTypes.Parameter,
47
[
ClassificationTypeNames
.LocalName] = SemanticTokenTypes.Variable,
48
[
ClassificationTypeNames
.PropertyName] = SemanticTokenTypes.Property,
49
[
ClassificationTypeNames
.MethodName] = SemanticTokenTypes.Method,
50
[
ClassificationTypeNames
.EnumMemberName] = SemanticTokenTypes.EnumMember,
51
[
ClassificationTypeNames
.EventName] = SemanticTokenTypes.Event,
52
[
ClassificationTypeNames
.PreprocessorKeyword] = SemanticTokenTypes.Macro,
54
[
ClassificationTypeNames
.LabelName] = "label",
61
private static readonly SemanticTokensSchema s_vsTokenSchema = new(
ClassificationTypeNames
.AllTypeNames
62
.Where(classificationTypeName => !
ClassificationTypeNames
.AdditiveTypeNames.Contains(classificationTypeName))
72
private static readonly SemanticTokensSchema s_pureLspTokenSchema = new(
ClassificationTypeNames
.AllTypeNames
73
.Where(classificationTypeName => !
ClassificationTypeNames
.AdditiveTypeNames.Contains(classificationTypeName))
83
[
ClassificationTypeNames
.StaticSymbol] = SemanticTokens.TokenModifiers.Static,
84
[
ClassificationTypeNames
.ReassignedVariable] = SemanticTokens.TokenModifiers.ReassignedVariable,
85
[
ClassificationTypeNames
.ObsoleteSymbol] = SemanticTokens.TokenModifiers.Deprecated,
86
[
ClassificationTypeNames
.TestCode] = SemanticTokens.TokenModifiers.None,
90
/// Mapping from roslyn <see cref="
ClassificationTypeNames
"/> to the LSP token name. This is either a standard
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (138)
SemanticTokens\SemanticTokensFullTests.cs (5)
45
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], (int)TokenModifiers.Static, // 'C'
46
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
47
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
59
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
60
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
SemanticTokens\SemanticTokensRangesTests.cs (5)
45
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], (int)TokenModifiers.Static, // 'C'
46
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
47
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
59
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
60
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
SemanticTokens\SemanticTokensRangeTests.cs (127)
49
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], (int)TokenModifiers.Static, // 'C'
50
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
51
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
63
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
64
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
138
12, 0, 3, tokenTypeToIndex[
ClassificationTypeNames
.Keyword], 0, // 'var'
139
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.LocalName], 0, // 'z'
142
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
143
16, 3, 3, tokenTypeToIndex[
ClassificationTypeNames
.Keyword], 0, // 'var'
144
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.LocalName], 0, // 'x'
157
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
196
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], (int)TokenModifiers.Static, // 'C'
197
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
198
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
209
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
210
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
247
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'C'
248
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
252
0, 9, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
262
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
266
0, 9, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
308
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'C'
309
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
311
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.MethodName], 0, // 'M'
312
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '('
313
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ')'
314
1, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
315
1, 8, 3, tokenTypeToIndex[
ClassificationTypeNames
.Keyword], 0, // 'var'
316
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.LocalName], 0, // 'x'
318
0, 2, 5, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // '@"one'
319
1, 0, 4, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // 'two '
320
0, 4, 2, tokenTypeToIndex[
ClassificationTypeNames
.StringEscapeCharacter], 0, // '""'
321
1, 0, 6, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // 'three"'
322
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
323
1, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
324
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
347
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
348
1, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
349
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '}'
391
0, 6, 6, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'System'
393
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'Text'
395
0, 1, 18, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'RegularExpressions'
396
0, 18, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
398
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'C'
399
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
401
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.MethodName], 0, // 'M'
402
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '('
403
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ')'
404
1, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
405
1, 2, 3, tokenTypeToIndex[
ClassificationTypeNames
.Keyword], 0, // 'var'
406
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.LocalName], 0, // 'x'
409
0, 4, 5, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'Regex'
410
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '('
412
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexGrouping], 0, // '('
413
0, 1, 3, tokenTypeToIndex[
ClassificationTypeNames
.RegexText], 0, // 'abc'
414
0, 3, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexGrouping], 0, // ')'
415
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexQuantifier], 0, // '*'
417
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ')'
418
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
419
1, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // }
420
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // }
503
0, 6, 6, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'System'
505
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'Text'
507
0, 1, 18, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0, // 'RegularExpressions'
508
0, 18, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
510
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'C'
511
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
513
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.MethodName], 0, // 'M'
514
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '('
515
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ')'
516
1, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '{'
517
1, 2, 3, tokenTypeToIndex[
ClassificationTypeNames
.Keyword], 0, // 'var'
518
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.LocalName], 0, // 'x'
521
0, 4, 5, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0, // 'Regex'
522
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // '('
523
0, 1, 2, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // '@"'
524
0, 2, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexGrouping], 0, // '('
525
0, 1, 3, tokenTypeToIndex[
ClassificationTypeNames
.RegexText], 0, // 'abc'
526
0, 3, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexGrouping], 0, // ')'
527
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.RegexQuantifier], 0, // '*'
528
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // ' '
529
0, 1, 9, tokenTypeToIndex[
ClassificationTypeNames
.RegexComment], 0, // '#comment'
530
1, 0, 27, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0, // '"'
531
0, 27, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ','
532
0, 2, 12, tokenTypeToIndex[
ClassificationTypeNames
.EnumName], 0, // 'RegexOptions'
534
0, 1, 23, tokenTypeToIndex[
ClassificationTypeNames
.EnumMemberName], 0, // 'IgnorePatternWhitespace'
535
0, 23, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ')'
536
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // ';'
537
1, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // }
538
1, 0, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0, // }
596
var expectedNames =
ClassificationTypeNames
.AllTypeNames.Where(s => !
ClassificationTypeNames
.AdditiveTypeNames.Contains(s));
641
0, 7, 4, tokenTypeToIndex[
ClassificationTypeNames
.ConstantName], 1,
643
0, 2, 2, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
645
0, 5, 1, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
646
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0,
647
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
648
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
649
1, 0, 12, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
651
1, 0, 8, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
652
0, 8, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
653
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.VerbatimStringLiteral], 0,
654
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
724
0, 1, 6, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0,
725
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
729
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.NamespaceName], 0,
730
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
736
0, 1, 7, tokenTypeToIndex[
ClassificationTypeNames
.ClassName], 0,
738
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
746
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.MethodName], 1,
747
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
749
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
750
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
752
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.ParameterName], 0,
753
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
755
0, 8, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
757
0, 12, 6, tokenTypeToIndex[
ClassificationTypeNames
.ControlKeyword], 0,
758
0, 6, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
760
0, 8, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
762
0, 4, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
768
0, 1, 6, tokenTypeToIndex[
ClassificationTypeNames
.StructName], 0,
770
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
771
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
777
0, 1, 4, tokenTypeToIndex[
ClassificationTypeNames
.InterfaceName], 0,
779
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
780
0, 1, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
782
0, 7, 1, tokenTypeToIndex[
ClassificationTypeNames
.Punctuation], 0,
SemanticTokens\SemanticTokensSchemaTests.cs (1)
16
foreach (var additiveClassification in
ClassificationTypeNames
.AdditiveTypeNames)
Microsoft.CodeAnalysis.Workspaces (47)
Classification\AbstractClassificationService.cs (2)
158
result.Add(new ClassifiedSpan(span,
ClassificationTypeNames
.ReassignedVariable));
166
result.Add(new ClassifiedSpan(span,
ClassificationTypeNames
.ObsoleteSymbol));
Classification\ClassificationExtensions.cs (13)
12
TypeKind.Class => type.IsRecord ?
ClassificationTypeNames
.RecordClassName :
ClassificationTypeNames
.ClassName,
13
TypeKind.Module =>
ClassificationTypeNames
.ModuleName,
14
TypeKind.Struct => type.IsRecord ?
ClassificationTypeNames
.RecordStructName :
ClassificationTypeNames
.StructName,
15
TypeKind.Interface =>
ClassificationTypeNames
.InterfaceName,
16
TypeKind.Enum =>
ClassificationTypeNames
.EnumName,
17
TypeKind.Delegate =>
ClassificationTypeNames
.DelegateName,
18
TypeKind.TypeParameter =>
ClassificationTypeNames
.TypeParameterName,
19
TypeKind.Dynamic =>
ClassificationTypeNames
.Keyword,
20
TypeKind.Array =>
ClassificationTypeNames
.ArrayName,
21
TypeKind.Pointer =>
ClassificationTypeNames
.PointerName,
22
TypeKind.FunctionPointer =>
ClassificationTypeNames
.FunctionPointerName,
Classification\Classifier.cs (27)
156
ClassificationTypeNames
.Identifier => SymbolDisplayPartKind.Text,
157
ClassificationTypeNames
.Keyword => SymbolDisplayPartKind.Keyword,
158
ClassificationTypeNames
.NumericLiteral => SymbolDisplayPartKind.NumericLiteral,
159
ClassificationTypeNames
.StringLiteral => SymbolDisplayPartKind.StringLiteral,
160
ClassificationTypeNames
.WhiteSpace => SymbolDisplayPartKind.Space,
161
ClassificationTypeNames
.Operator => SymbolDisplayPartKind.Operator,
162
ClassificationTypeNames
.Punctuation => SymbolDisplayPartKind.Punctuation,
163
ClassificationTypeNames
.ClassName => SymbolDisplayPartKind.ClassName,
164
ClassificationTypeNames
.RecordClassName => SymbolDisplayPartKind.RecordClassName,
165
ClassificationTypeNames
.StructName => SymbolDisplayPartKind.StructName,
166
ClassificationTypeNames
.InterfaceName => SymbolDisplayPartKind.InterfaceName,
167
ClassificationTypeNames
.DelegateName => SymbolDisplayPartKind.DelegateName,
168
ClassificationTypeNames
.EnumName => SymbolDisplayPartKind.EnumName,
169
ClassificationTypeNames
.TypeParameterName => SymbolDisplayPartKind.TypeParameterName,
170
ClassificationTypeNames
.ModuleName => SymbolDisplayPartKind.ModuleName,
171
ClassificationTypeNames
.VerbatimStringLiteral => SymbolDisplayPartKind.StringLiteral,
172
ClassificationTypeNames
.FieldName => SymbolDisplayPartKind.FieldName,
173
ClassificationTypeNames
.EnumMemberName => SymbolDisplayPartKind.EnumMemberName,
174
ClassificationTypeNames
.ConstantName => SymbolDisplayPartKind.ConstantName,
175
ClassificationTypeNames
.LocalName => SymbolDisplayPartKind.LocalName,
176
ClassificationTypeNames
.ParameterName => SymbolDisplayPartKind.ParameterName,
177
ClassificationTypeNames
.ExtensionMethodName => SymbolDisplayPartKind.ExtensionMethodName,
178
ClassificationTypeNames
.MethodName => SymbolDisplayPartKind.MethodName,
179
ClassificationTypeNames
.PropertyName => SymbolDisplayPartKind.PropertyName,
180
ClassificationTypeNames
.LabelName => SymbolDisplayPartKind.LabelName,
181
ClassificationTypeNames
.NamespaceName => SymbolDisplayPartKind.NamespaceName,
182
ClassificationTypeNames
.EventName => SymbolDisplayPartKind.EventName,
Classification\ClassifierHelper.cs (4)
106
if (
ClassificationTypeNames
.AdditiveTypeNames.Contains(span.ClassificationType))
174
ClassificationTypeNames
.AdditiveTypeNames.Contains(span.ClassificationType) ||
ClassificationTypeNames
.AdditiveTypeNames.Contains(previousSpan.ClassificationType);
205
result.Add(new ClassifiedSpan(
ClassificationTypeNames
.Text,
Classification\SyntaxClassification\AbstractNameSyntaxClassifier.cs (1)
35
result.Add(new ClassifiedSpan(span,
ClassificationTypeNames
.StaticSymbol));
Microsoft.VisualStudio.LanguageServices (90)
FindReferences\Entries\DocumentSpanEntry.cs (1)
122
cs => !
ClassificationTypeNames
.AdditiveTypeNames.Contains(cs.ClassificationType));
HACK_ThemeColorFixer.cs (79)
68
DeprioritizeStringClassification(textFormatMap,
ClassificationTypeNames
.StringLiteral);
69
DeprioritizeStringClassification(tooltipFormatMap,
ClassificationTypeNames
.StringLiteral);
70
DeprioritizeStringClassification(textFormatMap,
ClassificationTypeNames
.VerbatimStringLiteral);
71
DeprioritizeStringClassification(tooltipFormatMap,
ClassificationTypeNames
.VerbatimStringLiteral);
115
UpdateForegroundColor(
ClassificationTypeNames
.Comment, sourceFormatMap, targetFormatMap);
116
UpdateForegroundColor(
ClassificationTypeNames
.ExcludedCode, sourceFormatMap, targetFormatMap);
117
UpdateForegroundColor(
ClassificationTypeNames
.Identifier, sourceFormatMap, targetFormatMap);
118
UpdateForegroundColor(
ClassificationTypeNames
.Keyword, sourceFormatMap, targetFormatMap);
119
UpdateForegroundColor(
ClassificationTypeNames
.ControlKeyword, sourceFormatMap, targetFormatMap);
120
UpdateForegroundColor(
ClassificationTypeNames
.NumericLiteral, sourceFormatMap, targetFormatMap);
121
UpdateForegroundColor(
ClassificationTypeNames
.StringLiteral, sourceFormatMap, targetFormatMap);
123
UpdateForegroundColor(
ClassificationTypeNames
.VerbatimStringLiteral, sourceFormatMap, targetFormatMap);
124
UpdateForegroundColor(
ClassificationTypeNames
.StringEscapeCharacter, sourceFormatMap, targetFormatMap);
126
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentAttributeName, sourceFormatMap, targetFormatMap);
127
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentAttributeQuotes, sourceFormatMap, targetFormatMap);
128
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentAttributeValue, sourceFormatMap, targetFormatMap);
129
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentText, sourceFormatMap, targetFormatMap);
130
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentDelimiter, sourceFormatMap, targetFormatMap);
131
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentComment, sourceFormatMap, targetFormatMap);
132
UpdateForegroundColor(
ClassificationTypeNames
.XmlDocCommentCDataSection, sourceFormatMap, targetFormatMap);
134
UpdateForegroundColor(
ClassificationTypeNames
.RegexComment, sourceFormatMap, targetFormatMap);
135
UpdateForegroundColor(
ClassificationTypeNames
.RegexText, sourceFormatMap, targetFormatMap);
136
UpdateForegroundColor(
ClassificationTypeNames
.RegexCharacterClass, sourceFormatMap, targetFormatMap);
137
UpdateForegroundColor(
ClassificationTypeNames
.RegexQuantifier, sourceFormatMap, targetFormatMap);
138
UpdateForegroundColor(
ClassificationTypeNames
.RegexAnchor, sourceFormatMap, targetFormatMap);
139
UpdateForegroundColor(
ClassificationTypeNames
.RegexAlternation, sourceFormatMap, targetFormatMap);
140
UpdateForegroundColor(
ClassificationTypeNames
.RegexGrouping, sourceFormatMap, targetFormatMap);
141
UpdateForegroundColor(
ClassificationTypeNames
.RegexOtherEscape, sourceFormatMap, targetFormatMap);
142
UpdateForegroundColor(
ClassificationTypeNames
.RegexSelfEscapedCharacter, sourceFormatMap, targetFormatMap);
144
UpdateForegroundColor(
ClassificationTypeNames
.JsonComment, sourceFormatMap, targetFormatMap);
145
UpdateForegroundColor(
ClassificationTypeNames
.JsonNumber, sourceFormatMap, targetFormatMap);
146
UpdateForegroundColor(
ClassificationTypeNames
.JsonString, sourceFormatMap, targetFormatMap);
147
UpdateForegroundColor(
ClassificationTypeNames
.JsonKeyword, sourceFormatMap, targetFormatMap);
148
UpdateForegroundColor(
ClassificationTypeNames
.JsonText, sourceFormatMap, targetFormatMap);
149
UpdateForegroundColor(
ClassificationTypeNames
.JsonOperator, sourceFormatMap, targetFormatMap);
150
UpdateForegroundColor(
ClassificationTypeNames
.JsonArray, sourceFormatMap, targetFormatMap);
151
UpdateForegroundColor(
ClassificationTypeNames
.JsonObject, sourceFormatMap, targetFormatMap);
152
UpdateForegroundColor(
ClassificationTypeNames
.JsonPropertyName, sourceFormatMap, targetFormatMap);
153
UpdateForegroundColor(
ClassificationTypeNames
.JsonConstructorName, sourceFormatMap, targetFormatMap);
155
UpdateForegroundColor(
ClassificationTypeNames
.PreprocessorKeyword, sourceFormatMap, targetFormatMap);
156
UpdateForegroundColor(
ClassificationTypeNames
.PreprocessorText, sourceFormatMap, targetFormatMap);
158
UpdateForegroundColor(
ClassificationTypeNames
.Operator, sourceFormatMap, targetFormatMap);
159
UpdateForegroundColor(
ClassificationTypeNames
.OperatorOverloaded, sourceFormatMap, targetFormatMap);
160
UpdateForegroundColor(
ClassificationTypeNames
.Punctuation, sourceFormatMap, targetFormatMap);
162
UpdateForegroundColor(
ClassificationTypeNames
.ClassName, sourceFormatMap, targetFormatMap);
163
UpdateForegroundColor(
ClassificationTypeNames
.RecordClassName, sourceFormatMap, targetFormatMap);
164
UpdateForegroundColor(
ClassificationTypeNames
.StructName, sourceFormatMap, targetFormatMap);
165
UpdateForegroundColor(
ClassificationTypeNames
.InterfaceName, sourceFormatMap, targetFormatMap);
166
UpdateForegroundColor(
ClassificationTypeNames
.DelegateName, sourceFormatMap, targetFormatMap);
167
UpdateForegroundColor(
ClassificationTypeNames
.EnumName, sourceFormatMap, targetFormatMap);
168
UpdateForegroundColor(
ClassificationTypeNames
.TypeParameterName, sourceFormatMap, targetFormatMap);
169
UpdateForegroundColor(
ClassificationTypeNames
.ModuleName, sourceFormatMap, targetFormatMap);
170
UpdateForegroundColor(
ClassificationTypeNames
.ArrayName, sourceFormatMap, targetFormatMap);
171
UpdateForegroundColor(
ClassificationTypeNames
.PointerName, sourceFormatMap, targetFormatMap);
172
UpdateForegroundColor(
ClassificationTypeNames
.FunctionPointerName, sourceFormatMap, targetFormatMap);
174
UpdateForegroundColor(
ClassificationTypeNames
.FieldName, sourceFormatMap, targetFormatMap);
175
UpdateForegroundColor(
ClassificationTypeNames
.EnumMemberName, sourceFormatMap, targetFormatMap);
176
UpdateForegroundColor(
ClassificationTypeNames
.ConstantName, sourceFormatMap, targetFormatMap);
177
UpdateForegroundColor(
ClassificationTypeNames
.LocalName, sourceFormatMap, targetFormatMap);
178
UpdateForegroundColor(
ClassificationTypeNames
.ParameterName, sourceFormatMap, targetFormatMap);
179
UpdateForegroundColor(
ClassificationTypeNames
.MethodName, sourceFormatMap, targetFormatMap);
180
UpdateForegroundColor(
ClassificationTypeNames
.ExtensionMethodName, sourceFormatMap, targetFormatMap);
181
UpdateForegroundColor(
ClassificationTypeNames
.PropertyName, sourceFormatMap, targetFormatMap);
182
UpdateForegroundColor(
ClassificationTypeNames
.EventName, sourceFormatMap, targetFormatMap);
183
UpdateForegroundColor(
ClassificationTypeNames
.NamespaceName, sourceFormatMap, targetFormatMap);
184
UpdateForegroundColor(
ClassificationTypeNames
.LabelName, sourceFormatMap, targetFormatMap);
186
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralText, sourceFormatMap, targetFormatMap);
187
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralProcessingInstruction, sourceFormatMap, targetFormatMap);
188
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralName, sourceFormatMap, targetFormatMap);
189
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralEmbeddedExpression, sourceFormatMap, targetFormatMap);
190
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralDelimiter, sourceFormatMap, targetFormatMap);
191
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralComment, sourceFormatMap, targetFormatMap);
192
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralCDataSection, sourceFormatMap, targetFormatMap);
193
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralAttributeValue, sourceFormatMap, targetFormatMap);
194
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralAttributeQuotes, sourceFormatMap, targetFormatMap);
195
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralAttributeName, sourceFormatMap, targetFormatMap);
196
UpdateForegroundColor(
ClassificationTypeNames
.XmlLiteralEntityReference, sourceFormatMap, targetFormatMap);
198
UpdateForegroundColor(
ClassificationTypeNames
.TestCode, sourceFormatMap, targetFormatMap);
199
UpdateForegroundColor(
ClassificationTypeNames
.TestCodeMarkdown, sourceFormatMap, targetFormatMap);
StackTraceExplorer\IgnoredFrameViewModel.cs (1)
28
var run = MakeClassifiedRun(
ClassificationTypeNames
.Comment, _frame.ToString());
StackTraceExplorer\StackFrameViewModel.cs (7)
143
yield return MakeClassifiedRun(
ClassificationTypeNames
.Text, CreateString(classLeadingTrivia));
151
classLink.Inlines.Add(MakeClassifiedRun(
ClassificationTypeNames
.ClassName, classLinkText));
174
methodLink.Inlines.Add(MakeClassifiedRun(
ClassificationTypeNames
.MethodName, methodTextBuilder.ToString()));
186
yield return MakeClassifiedRun(
ClassificationTypeNames
.Text, CreateString(leadingTrivia));
190
fileLink.Inlines.Add(MakeClassifiedRun(
ClassificationTypeNames
.Text, fileInformation.ToString()));
196
yield return MakeClassifiedRun(
ClassificationTypeNames
.Text, CreateString(trailingTrivia));
202
yield return MakeClassifiedRun(
ClassificationTypeNames
.Text, _frame.Root.EndOfLineToken.ToFullString());
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
237
builder.Add(new ClassifiedSpan(new TextSpan(0, contentSpan.Length),
ClassificationTypeNames
.Text));
244
builder.Add(new ClassifiedSpan(new TextSpan(lastSpan.End, contentSpan.Length - lastSpan.End),
ClassificationTypeNames
.Text));