30 instantiations of CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (30)
Language\Components\ComponentTildePathPass.cs (1)
189
return new
CSharpIntermediateToken
($"{ComponentsApi.ComponentBase.Assets}[@\"{literal}\"]", source: null);
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (3)
456
innerExpr.Children[0] = new
CSharpIntermediateToken
(
470
expr.Children.Add(new
CSharpIntermediateToken
(
606
node.Children.Add(new
CSharpIntermediateToken
(content, mergedSpan));
Language\DefaultTagHelperResolutionPhase.cs (3)
771
target.Children.Add(new
CSharpIntermediateToken
(token.Content, token.Source));
1024
: new
CSharpIntermediateToken
(htmlToken.Content, htmlToken.Source);
1355
target.Children.Add(new
CSharpIntermediateToken
(mergedContent, mergedSpan));
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (16)
464
targetNode.Children.Add(new
CSharpIntermediateToken
(string.Empty, emptySource));
509
targetNode.Children.Add(new
CSharpIntermediateToken
(content, source));
601
targetNode.Children.Add(new
CSharpIntermediateToken
(sourceText, valueSource));
633
targetNode.Children.Add(new
CSharpIntermediateToken
(intermediateToken.Content, intermediateToken.Source));
638
targetNode.Children.Add(new
CSharpIntermediateToken
(intermediateToken.Content, intermediateToken.Source));
664
targetNode.Children.Add(new
CSharpIntermediateToken
(attrContent, tokenSource));
677
targetNode.Children.Add(new
CSharpIntermediateToken
(string.Empty, emptySource));
680
targetNode.Children.Add(new
CSharpIntermediateToken
("@", transSource));
692
targetNode.Children.Add(new
CSharpIntermediateToken
("(", openSource));
705
targetNode.Children.Add(new
CSharpIntermediateToken
(")", closeSource));
743
targetNode.Children.Add(new
CSharpIntermediateToken
("(", openParenSource));
754
targetNode.Children.Add(new
CSharpIntermediateToken
(innerToken.Content, innerToken.Source));
769
targetNode.Children.Add(new
CSharpIntermediateToken
(")", closeParenSource));
1356
expr.Children.Add(new
CSharpIntermediateToken
(text, contentSpan));
1386
expr.Children.Add(new
CSharpIntermediateToken
(mergedContent, tokenSpan));
1416
target.Children.Add(new
CSharpIntermediateToken
(text, vss));
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (2)
39
: new
CSharpIntermediateToken
(t.Content, t.Source),
67
return new
CSharpIntermediateToken
(sb.ToString(), mergedSpan);
Language\Intermediate\CSharpIntermediateToken.cs (1)
19
=> new
CSharpIntermediateToken
(Content, Source)
Language\Intermediate\IntermediateNodeFactory.cs (2)
11
=>
new
(content, source);
14
=>
new
(LazyContent.Create(arg, contentFactory), source);
Language\MarkupSplitter.Slicing.cs (2)
117
return new
CSharpIntermediateToken
(slicedContent, source: null);
137
return new
CSharpIntermediateToken
(slicedContent, slicedSource);
62 references to CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (62)
Language\CodeGeneration\IntermediateNodeWriter.cs (5)
93
var
firstCSharpChild = node.Children.OfType<
CSharpIntermediateToken
>().FirstOrDefault();
113
if (child is
CSharpIntermediateToken
csharpToken)
156
if (children[i] is
CSharpIntermediateToken
token)
437
if (child is
CSharpIntermediateToken
token)
Language\Components\ComponentBindLoweringPass.cs (1)
871
var
startToken = awaitable
Language\Components\ComponentGenericTypePass.cs (1)
294
return string.Join(string.Empty, node.FindDescendantNodes<
CSharpIntermediateToken
>().Select(t => t.Content));
Language\Components\ComponentMarkupBlockPass.cs (1)
252
if (node is
CSharpIntermediateToken
)
Language\Components\ComponentNodeWriter.cs (16)
677
if (child is
CSharpIntermediateToken
token)
718
var
firstCSharpChild = node.Children.OfType<
CSharpIntermediateToken
>().FirstOrDefault();
742
if (child is
CSharpIntermediateToken
csharpToken)
1451
private static ImmutableArray<
CSharpIntermediateToken
> GetCSharpTokens(IntermediateNode node)
1454
return node.FindDescendantNodes<
CSharpIntermediateToken
>();
1575
using var tokens = new PooledArrayBuilder<
CSharpIntermediateToken
>();
1635
var
assignmentToken = shouldTypeCheck
1755
if (token is
CSharpIntermediateToken
)
1776
WriteCSharpToken(context, (
CSharpIntermediateToken
)token);
1805
if (token is
CSharpIntermediateToken
csharpToken)
1850
private static void WriteCSharpTokens(CodeRenderingContext context, ImmutableArray<
CSharpIntermediateToken
> tokens)
1852
foreach (
var
token in tokens)
1858
private static void WriteCSharpTokens(CodeRenderingContext context, ref readonly PooledArrayBuilder<
CSharpIntermediateToken
> tokens)
1860
foreach (
var
token in tokens)
1866
private static void WriteCSharpToken(CodeRenderingContext context,
CSharpIntermediateToken
token)
Language\Components\ComponentSplatLoweringPass.cs (1)
42
result.Children.AddRange(node.FindDescendantNodes<
CSharpIntermediateToken
>());
Language\Components\ComponentTildePathPass.cs (1)
166
private static
CSharpIntermediateToken
? TryExpandAssetPath(IntermediateNode ownerNode, IntermediateNode? valueContainer, string attributeName)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (8)
433
/// When false (regular bound properties), literals become direct <see cref="
CSharpIntermediateToken
"/>s.
454
if (innerExpr.Children is [
CSharpIntermediateToken
firstToken, ..])
468
if (!prefixedFirst && token is
CSharpIntermediateToken
csharpToken)
533
/// Merges <see cref="
CSharpIntermediateToken
"/> children (and content from
545
if (child is
CSharpIntermediateToken
)
551
&& expr.Children.All(static inner => inner is
CSharpIntermediateToken
))
572
if (child is
CSharpIntermediateToken
csharpToken)
585
if (inner is
CSharpIntermediateToken
innerToken)
Language\DefaultTagHelperResolutionPhase.cs (6)
761
if (source is
CSharpIntermediateToken
csharpToken)
902
/// structured <see cref="
CSharpIntermediateToken
"/> children: <c>@</c>, <c>(</c>,
1017
/// Converts an <see cref="HtmlIntermediateToken"/> to a <see cref="
CSharpIntermediateToken
"/>,
1020
private static
CSharpIntermediateToken
ToCSharpToken(HtmlIntermediateToken htmlToken)
1040
/// Creates an empty <see cref="
CSharpIntermediateToken
"/> with an empty string.
1042
private static
CSharpIntermediateToken
CreateEmptyCSharpToken(SourceSpan? source)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (7)
752
if (innerChild is
CSharpIntermediateToken
innerToken)
818
Func<
CSharpIntermediateToken
, IntermediateNode> createCSharpWrapper)
829
if (innerChild is
CSharpIntermediateToken
csharpToken)
1106
if (innerChild is
CSharpIntermediateToken
csharpToken)
1302
/// For implicit expressions, produces a single <see cref="
CSharpIntermediateToken
"/>.
1407
/// Produces a single <see cref="
CSharpIntermediateToken
"/> with the raw source text.
1421
/// flat <see cref="
CSharpIntermediateToken
"/>s for literals, <see cref="CSharpExpressionIntermediateNode"/>
Language\Extensions\DefaultTagHelperTargetExtension.cs (1)
331
node.Children is [
CSharpIntermediateToken
token])
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (6)
10
BoundAttributeDescriptor boundAttribute,
CSharpIntermediateToken
value) : IntermediateNode
17
public
CSharpIntermediateToken
Value { get; } = value;
28
private static
CSharpIntermediateToken
GetValue(TagHelperPropertyIntermediateNode node)
31
[
CSharpIntermediateToken
t] => t,
32
[CSharpExpressionIntermediateNode { Children: [
CSharpIntermediateToken
t] }] => t,
49
private static
CSharpIntermediateToken
MergeChildTokens(TagHelperPropertyIntermediateNode node)
Language\Intermediate\IntermediateNodeFactory.cs (2)
10
public static
CSharpIntermediateToken
CSharpToken(string content, SourceSpan? source = null)
13
public static
CSharpIntermediateToken
CSharpToken<T>(T arg, Func<T, string> contentFactory, SourceSpan? source = null)
Language\Intermediate\UnresolvedAttributeValueIntermediateNode.cs (1)
14
/// <item>A <see cref="
CSharpIntermediateToken
"/> (for bound non-string tag helper properties)</item>
Language\Intermediate\UnresolvedExpressionAttributeValueIntermediateNode.cs (1)
14
/// <item>Direct <see cref="
CSharpIntermediateToken
"/> children (for bound non-string tag helper properties)</item>
Language\MarkupSplitter.cs (1)
21
/// <see cref="
CSharpIntermediateToken
"/>) interleaved with markup nodes. The vast majority of
Language\MarkupSplitter.Slicing.cs (1)
110
internal static
CSharpIntermediateToken
SliceToken(IntermediateToken token, int localStart, int localLength)
Mvc\ModelExpressionPass.cs (2)
46
if (node.Children.Count == 1 && node.Children[0] is
CSharpIntermediateToken
token)
62
if (nestedExpression.Children[j] is
CSharpIntermediateToken
csharpToken)