26 instantiations of CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (26)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (3)
441
innerExpr.Children[0] = new
CSharpIntermediateToken
(
455
expr.Children.Add(new
CSharpIntermediateToken
(
591
node.Children.Add(new
CSharpIntermediateToken
(content, mergedSpan));
Language\DefaultTagHelperResolutionPhase.cs (3)
702
target.Children.Add(new
CSharpIntermediateToken
(token.Content, token.Source));
955
: new
CSharpIntermediateToken
(htmlToken.Content, htmlToken.Source);
1282
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\IntermediateNodeFactory.cs (2)
11
=>
new
(content, source);
14
=>
new
(LazyContent.Create(arg, contentFactory), source);
59 references to CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (59)
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)
846
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)
1439
private static ImmutableArray<
CSharpIntermediateToken
> GetCSharpTokens(IntermediateNode node)
1442
return node.FindDescendantNodes<
CSharpIntermediateToken
>();
1563
using var tokens = new PooledArrayBuilder<
CSharpIntermediateToken
>();
1623
var
assignmentToken = shouldTypeCheck
1743
if (token is
CSharpIntermediateToken
)
1764
WriteCSharpToken(context, (
CSharpIntermediateToken
)token);
1793
if (token is
CSharpIntermediateToken
csharpToken)
1838
private static void WriteCSharpTokens(CodeRenderingContext context, ImmutableArray<
CSharpIntermediateToken
> tokens)
1840
foreach (
var
token in tokens)
1846
private static void WriteCSharpTokens(CodeRenderingContext context, ref readonly PooledArrayBuilder<
CSharpIntermediateToken
> tokens)
1848
foreach (
var
token in tokens)
1854
private static void WriteCSharpToken(CodeRenderingContext context,
CSharpIntermediateToken
token)
Language\Components\ComponentSplatLoweringPass.cs (1)
42
result.Children.AddRange(node.FindDescendantNodes<
CSharpIntermediateToken
>());
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (8)
418
/// When false (regular bound properties), literals become direct <see cref="
CSharpIntermediateToken
"/>s.
439
if (innerExpr.Children is [
CSharpIntermediateToken
firstToken, ..])
453
if (!prefixedFirst && token is
CSharpIntermediateToken
csharpToken)
518
/// Merges <see cref="
CSharpIntermediateToken
"/> children (and content from
530
if (child is
CSharpIntermediateToken
)
536
&& expr.Children.All(static inner => inner is
CSharpIntermediateToken
))
557
if (child is
CSharpIntermediateToken
csharpToken)
570
if (inner is
CSharpIntermediateToken
innerToken)
Language\DefaultTagHelperResolutionPhase.cs (6)
692
if (source is
CSharpIntermediateToken
csharpToken)
833
/// structured <see cref="
CSharpIntermediateToken
"/> children: <c>@</c>, <c>(</c>,
948
/// Converts an <see cref="HtmlIntermediateToken"/> to a <see cref="
CSharpIntermediateToken
"/>,
951
private static
CSharpIntermediateToken
ToCSharpToken(HtmlIntermediateToken htmlToken)
971
/// Creates an empty <see cref="
CSharpIntermediateToken
"/> with an empty string.
973
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)
323
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>
Mvc\ModelExpressionPass.cs (2)
46
if (node.Children.Count == 1 && node.Children[0] is
CSharpIntermediateToken
token)
62
if (nestedExpression.Children[j] is
CSharpIntermediateToken
csharpToken)