46 references to GetSpan
Microsoft.CodeAnalysis.Features (46)
EmbeddedLanguages\Json\JsonParser.cs (5)
185firstToken.GetSpan()); 197emptyValue.CommaToken.GetSpan()); 204propertyValue.ColonToken.GetSpan()); 245((JsonPropertyNode)child).ColonToken.GetSpan()); 444nestedProperty.ColonToken.GetSpan())),
EmbeddedLanguages\Json\JsonParser.JsonNetSyntaxChecks.cs (4)
145? new EmbeddedDiagnostic(FeaturesResources.Invalid_constructor_name, node.NameToken.GetSpan()) 168return new EmbeddedDiagnostic(string.Format(FeaturesResources._0_expected, ','), GetFirstToken(nextChild).GetSpan()); 179return new EmbeddedDiagnostic(FeaturesResources.Only_properties_allowed_in_an_object, GetFirstToken(child).GetSpan()); 187? 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 (2)
98context.AddClassification(ClassificationTypeNames.JsonPunctuation, token.GetSpan()); 123Context.AddClassification(typeName, token.GetSpan());
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (1)
111Context.AddClassification(typeName, token.GetSpan());
EmbeddedLanguages\RegularExpressions\RegexLexer.cs (2)
247token.GetSpan())); 301token.GetSpan()));
EmbeddedLanguages\RegularExpressions\RegexParser.cs (23)
277barToken.GetSpan())); 548secondNumberTokenLocal.GetSpan())); 611new EmbeddedDiagnostic(FeaturesResources.Too_many_close_parens, _currentToken.GetSpan())); 706: token.GetSpan(); 764openParenToken.GetSpan())); 809capture.GetSpan())); 817capture.GetSpan())); 895openParenToken.GetSpan())); 902openParenToken.GetSpan())); 911openParenToken.GetSpan())); 1009capture.GetSpan())); 1049_currentToken.GetSpan())); 1109captureToken.GetSpan())); 1119captureToken.GetSpan())); 1165new EmbeddedDiagnostic(FeaturesResources.Unrecognized_grouping_construct, openParenToken.GetSpan()))); 1310minusToken.GetSpan())); 1572backslashToken.GetSpan())); 1618backslashToken.GetSpan())); 1848typeToken.GetSpan())); 1880typeToken.GetSpan())); 1920_currentToken.GetSpan())); 2015string.Format(FeaturesResources.Quantifier_0_following_nothing, token.VirtualChars.First()), token.GetSpan())); 2020string.Format(FeaturesResources.Nested_quantifier_0, token.VirtualChars.First()), token.GetSpan()));