45 references to GetSpan
Microsoft.CodeAnalysis.Features (45)
EmbeddedLanguages\Json\JsonParser.cs (5)
186firstToken.GetSpan()); 198emptyValue.CommaToken.GetSpan()); 205propertyValue.ColonToken.GetSpan()); 246((JsonPropertyNode)child).ColonToken.GetSpan()); 445nestedProperty.ColonToken.GetSpan())),
EmbeddedLanguages\Json\JsonParser.JsonNetSyntaxChecks.cs (4)
109? new EmbeddedDiagnostic(FeaturesResources.Invalid_constructor_name, node.NameToken.GetSpan()) 132return new EmbeddedDiagnostic(string.Format(FeaturesResources._0_expected, ','), GetFirstToken(nextChild).GetSpan()); 143return new EmbeddedDiagnostic(FeaturesResources.Only_properties_allowed_in_an_object, GetFirstToken(child).GetSpan()); 151? new EmbeddedDiagnostic(FeaturesResources.Invalid_property_name, node.NameToken.GetSpan())
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (7)
114return new EmbeddedDiagnostic(FeaturesResources.Only_properties_allowed_in_an_object, GetFirstToken(child).GetSpan()); 118return new EmbeddedDiagnostic(FeaturesResources.Trailing_comma_not_allowed, node.Sequence.NodesAndTokens[^1].Token.GetSpan()); 142return new EmbeddedDiagnostic(string.Format(FeaturesResources._0_expected, ","), GetFirstToken(child).GetSpan()); 155return new EmbeddedDiagnostic(FeaturesResources.Property_name_must_be_a_string, node.NameToken.GetSpan()); 220? new EmbeddedDiagnostic(FeaturesResources.Invalid_number, literalToken.GetSpan()) 257=> new(string.Format(FeaturesResources._0_literal_not_allowed, literalToken.VirtualChars.CreateString()), literalToken.GetSpan()); 263=> new(FeaturesResources.Constructors_not_allowed, node.NewKeyword.GetSpan());
EmbeddedLanguages\Json\LanguageServices\JsonBraceMatcher.cs (2)
110: new BraceMatchingResult(open.GetSpan(), close.GetSpan());
EmbeddedLanguages\Json\LanguageServices\JsonClassifier.cs (1)
113Context.AddClassification(typeName, token.GetSpan());
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (1)
111Context.AddClassification(typeName, token.GetSpan());
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (2)
254token.GetSpan())); 307token.GetSpan()));
EmbeddedLanguages\RegularExpressions\RegexParser.cs (23)
279barToken.GetSpan())); 550secondNumberTokenLocal.GetSpan())); 613new EmbeddedDiagnostic(FeaturesResources.Too_many_close_parens, _currentToken.GetSpan())); 708: token.GetSpan(); 763openParenToken.GetSpan())); 808capture.GetSpan())); 816capture.GetSpan())); 894openParenToken.GetSpan())); 901openParenToken.GetSpan())); 910openParenToken.GetSpan())); 1008capture.GetSpan())); 1048_currentToken.GetSpan())); 1108captureToken.GetSpan())); 1118captureToken.GetSpan())); 1164new EmbeddedDiagnostic(FeaturesResources.Unrecognized_grouping_construct, openParenToken.GetSpan()))); 1310minusToken.GetSpan())); 1608backslashToken.GetSpan())); 1654backslashToken.GetSpan())); 1884typeToken.GetSpan())); 1916typeToken.GetSpan())); 1956_currentToken.GetSpan())); 2051FeaturesResources.Quantifier_x_y_following_nothing, token.GetSpan())); 2056string.Format(FeaturesResources.Nested_quantifier_0, token.VirtualChars.First()), token.GetSpan()));