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