2 instantiations of EmbeddedSyntaxToken
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (1)
51return new EmbeddedSyntaxToken<TSyntaxKind>(
Infrastructure\RoutePattern\RoutePatternHelpers.cs (1)
17=> new(kind, virtualChars, ImmutableArray<EmbeddedDiagnostic>.Empty, value: null);
94 references to EmbeddedSyntaxToken
Microsoft.AspNetCore.App.Analyzers (94)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxHelpers.cs (2)
12public static TextSpan GetSpan<TSyntaxKind>(EmbeddedSyntaxToken<TSyntaxKind> token1, EmbeddedSyntaxToken<TSyntaxKind> token2) where TSyntaxKind : struct
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNode.cs (1)
99var token = child.Token;
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxNodeOrToken.cs (4)
14private readonly EmbeddedSyntaxToken<TSyntaxKind> _token; 23private EmbeddedSyntaxNodeOrToken(EmbeddedSyntaxToken<TSyntaxKind> token) : this() 29public readonly EmbeddedSyntaxToken<TSyntaxKind> Token 48public static implicit operator EmbeddedSyntaxNodeOrToken<TSyntaxKind, TSyntaxNode>(EmbeddedSyntaxToken<TSyntaxKind> token)
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxToken.cs (3)
39public EmbeddedSyntaxToken<TSyntaxKind> AddDiagnosticIfNone(EmbeddedDiagnostic diagnostic) 42public EmbeddedSyntaxToken<TSyntaxKind> WithDiagnostics(ImmutableArray<EmbeddedDiagnostic> diagnostics) 45public EmbeddedSyntaxToken<TSyntaxKind> With(
Infrastructure\EmbeddedSyntax\EmbeddedSyntaxTrivia.cs (1)
12/// Trivia on an <see cref="EmbeddedSyntaxToken{TSyntaxKind}"/>.
Infrastructure\RoutePattern\RoutePatternHelpers.cs (3)
12using RoutePatternToken = EmbeddedSyntaxToken<RoutePatternKind>; 16public static RoutePatternToken CreateToken(RoutePatternKind kind, VirtualCharSequence virtualChars) 19public static RoutePatternToken CreateMissingToken(RoutePatternKind kind)
Infrastructure\RoutePattern\RoutePatternLexer.cs (14)
12using RoutePatternToken = EmbeddedSyntaxToken<RoutePatternKind>; 34public RoutePatternToken ScanNextToken() 87internal RoutePatternToken? TryScanLiteral() 140var token = CreateToken(RoutePatternKind.Literal, GetSubPatternToCurrentPos(start)); 172internal RoutePatternToken? TryScanParameterName() 218var token = CreateToken(RoutePatternKind.ParameterNameToken, GetSubPatternToCurrentPos(start)); 250internal RoutePatternToken? TryScanUnescapedPolicyFragment() 291var token = CreateToken(RoutePatternKind.PolicyFragmentToken, GetSubPatternToCurrentPos(start)); 341internal RoutePatternToken? TryScanEscapedPolicyFragment() 381var token = CreateToken(RoutePatternKind.PolicyFragmentToken, GetSubPatternToCurrentPos(start)); 391internal RoutePatternToken? TryScanReplacementToken() 424var token = CreateToken(RoutePatternKind.ReplacementToken, GetSubPatternToCurrentPos(start)); 434internal RoutePatternToken? TryScanDefaultValue() 465var token = CreateToken(RoutePatternKind.DefaultValueToken, GetSubPatternToCurrentPos(start));
Infrastructure\RoutePattern\RoutePatternNodes.cs (39)
12using RoutePatternToken = EmbeddedSyntaxToken<RoutePatternKind>; 16public RoutePatternCompilationUnit(ImmutableArray<RoutePatternRootPartNode> parts, RoutePatternToken endOfFileToken) 26public RoutePatternToken EndOfFileToken { get; } 69RoutePatternToken openBracketToken, RoutePatternToken textToken, RoutePatternToken closeBracketToken) 80public RoutePatternToken OpenBracketToken { get; } 81public RoutePatternToken TextToken { get; } 82public RoutePatternToken CloseBracketToken { get; } 105RoutePatternToken openBraceToken, ImmutableArray<RoutePatternParameterPartNode> parameterPartNodes, RoutePatternToken closeBraceToken) 115public RoutePatternToken OpenBraceToken { get; } 117public RoutePatternToken CloseBraceToken { get; } 143public RoutePatternLiteralNode(RoutePatternToken literalToken) 150public RoutePatternToken LiteralToken { get; } 167public RoutePatternOptionalSeparatorNode(RoutePatternToken separatorToken) 174public RoutePatternToken SeparatorToken { get; } 191public RoutePatternSegmentSeparatorNode(RoutePatternToken separatorToken) 198public RoutePatternToken SeparatorToken { get; } 215public RoutePatternCatchAllParameterPartNode(RoutePatternToken asteriskToken) 222public RoutePatternToken AsteriskToken { get; } 239public RoutePatternOptionalParameterPartNode(RoutePatternToken questionMarkToken) 246public RoutePatternToken QuestionMarkToken { get; } 263public RoutePatternDefaultValueParameterPartNode(RoutePatternToken equalsToken, RoutePatternToken defaultValueToken) 272public RoutePatternToken EqualsToken { get; } 273public RoutePatternToken DefaultValueToken { get; } 291public RoutePatternNameParameterPartNode(RoutePatternToken parameterNameToken) 298public RoutePatternToken ParameterNameToken { get; } 315public RoutePatternPolicyParameterPartNode(RoutePatternToken colonToken, ImmutableArray<RoutePatternNode> policyFragments) 323public RoutePatternToken ColonToken { get; } 342RoutePatternToken openParenToken, RoutePatternToken argumentToken, RoutePatternToken closeParenToken) 353public RoutePatternToken OpenParenToken { get; } 354public RoutePatternToken ArgumentToken { get; } 355public RoutePatternToken CloseParenToken { get; } 374public RoutePatternPolicyFragment(RoutePatternToken argumentToken) 381public RoutePatternToken ArgumentToken { get; }
Infrastructure\RoutePattern\RoutePatternParser.cs (18)
17using RoutePatternToken = EmbeddedSyntaxToken<RoutePatternKind>; 22private RoutePatternToken _currentToken; 38private RoutePatternToken ConsumeCurrentToken() 40var previous = _currentToken; 325var token = child.Token; 384var openBraceToken = _currentToken; 399var openBracketToken = _currentToken; 437private RoutePatternReplacementNode ParseReplacement(RoutePatternToken openBracketToken) 466private RoutePatternParameterNode ParseParameter(RoutePatternToken openBraceToken) 476private RoutePatternToken ConsumeToken(RoutePatternKind kind, string? error) 483var result = CreateMissingToken(kind); 499var firstAsteriskToken = _currentToken; 505var asterisksToken = CreateToken( 562var equalsToken = _currentToken; 563var defaultValue = _lexer.TryScanDefaultValue() ?? CreateMissingToken(RoutePatternKind.DefaultValueToken); 572var colonToken = ConsumeCurrentToken(); 585var openParenPosition = ConsumeCurrentToken(); 617private TextSpan GetTokenStartPositionSpan(RoutePatternToken token)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
26using RoutePatternToken = Microsoft.AspNetCore.Analyzers.Infrastructure.EmbeddedSyntax.EmbeddedSyntaxToken<Microsoft.AspNetCore.Analyzers.Infrastructure.RoutePattern.RoutePatternKind>;
RouteEmbeddedLanguage\RoutePatternBraceMatcher.cs (3)
12using RoutePatternToken = Microsoft.AspNetCore.Analyzers.Infrastructure.EmbeddedSyntax.EmbeddedSyntaxToken<Microsoft.AspNetCore.Analyzers.Infrastructure.RoutePattern.RoutePatternKind>; 102private static AspNetCoreBraceMatchingResult? CreateResult(RoutePatternToken open, RoutePatternToken close)
RouteEmbeddedLanguage\RoutePatternClassifier.cs (2)
10using RoutePatternToken = Microsoft.AspNetCore.Analyzers.Infrastructure.EmbeddedSyntax.EmbeddedSyntaxToken<Microsoft.AspNetCore.Analyzers.Infrastructure.RoutePattern.RoutePatternKind>; 131private void AddClassification(RoutePatternToken token, string typeName)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (3)
22using RoutePatternToken = Microsoft.AspNetCore.Analyzers.Infrastructure.EmbeddedSyntax.EmbeddedSyntaxToken<Microsoft.AspNetCore.Analyzers.Infrastructure.RoutePattern.RoutePatternKind>; 219private static (RoutePatternNode Parent, RoutePatternToken Token)? GetCurrentToken(EmbeddedCompletionContext context) 282private static (RoutePatternNode Parent, RoutePatternToken Token)? FindToken(RoutePatternNode parent, VirtualChar ch)