26 instantiations of CSharpIntermediateToken
Microsoft.CodeAnalysis.Razor.Compiler (26)
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (3)
441innerExpr.Children[0] = new CSharpIntermediateToken( 455expr.Children.Add(new CSharpIntermediateToken( 591node.Children.Add(new CSharpIntermediateToken(content, mergedSpan));
Language\DefaultTagHelperResolutionPhase.cs (3)
702target.Children.Add(new CSharpIntermediateToken(token.Content, token.Source)); 955: new CSharpIntermediateToken(htmlToken.Content, htmlToken.Source); 1282target.Children.Add(new CSharpIntermediateToken(mergedContent, mergedSpan));
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (16)
464targetNode.Children.Add(new CSharpIntermediateToken(string.Empty, emptySource)); 509targetNode.Children.Add(new CSharpIntermediateToken(content, source)); 601targetNode.Children.Add(new CSharpIntermediateToken(sourceText, valueSource)); 633targetNode.Children.Add(new CSharpIntermediateToken(intermediateToken.Content, intermediateToken.Source)); 638targetNode.Children.Add(new CSharpIntermediateToken(intermediateToken.Content, intermediateToken.Source)); 664targetNode.Children.Add(new CSharpIntermediateToken(attrContent, tokenSource)); 677targetNode.Children.Add(new CSharpIntermediateToken(string.Empty, emptySource)); 680targetNode.Children.Add(new CSharpIntermediateToken("@", transSource)); 692targetNode.Children.Add(new CSharpIntermediateToken("(", openSource)); 705targetNode.Children.Add(new CSharpIntermediateToken(")", closeSource)); 743targetNode.Children.Add(new CSharpIntermediateToken("(", openParenSource)); 754targetNode.Children.Add(new CSharpIntermediateToken(innerToken.Content, innerToken.Source)); 769targetNode.Children.Add(new CSharpIntermediateToken(")", closeParenSource)); 1356expr.Children.Add(new CSharpIntermediateToken(text, contentSpan)); 1386expr.Children.Add(new CSharpIntermediateToken(mergedContent, tokenSpan)); 1416target.Children.Add(new CSharpIntermediateToken(text, vss));
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (2)
39: new CSharpIntermediateToken(t.Content, t.Source), 67return 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)
93var firstCSharpChild = node.Children.OfType<CSharpIntermediateToken>().FirstOrDefault(); 113if (child is CSharpIntermediateToken csharpToken) 156if (children[i] is CSharpIntermediateToken token) 437if (child is CSharpIntermediateToken token)
Language\Components\ComponentBindLoweringPass.cs (1)
846var startToken = awaitable
Language\Components\ComponentGenericTypePass.cs (1)
294return string.Join(string.Empty, node.FindDescendantNodes<CSharpIntermediateToken>().Select(t => t.Content));
Language\Components\ComponentMarkupBlockPass.cs (1)
252if (node is CSharpIntermediateToken)
Language\Components\ComponentNodeWriter.cs (16)
677if (child is CSharpIntermediateToken token) 718var firstCSharpChild = node.Children.OfType<CSharpIntermediateToken>().FirstOrDefault(); 742if (child is CSharpIntermediateToken csharpToken) 1439private static ImmutableArray<CSharpIntermediateToken> GetCSharpTokens(IntermediateNode node) 1442return node.FindDescendantNodes<CSharpIntermediateToken>(); 1563using var tokens = new PooledArrayBuilder<CSharpIntermediateToken>(); 1623var assignmentToken = shouldTypeCheck 1743if (token is CSharpIntermediateToken) 1764WriteCSharpToken(context, (CSharpIntermediateToken)token); 1793if (token is CSharpIntermediateToken csharpToken) 1838private static void WriteCSharpTokens(CodeRenderingContext context, ImmutableArray<CSharpIntermediateToken> tokens) 1840foreach (var token in tokens) 1846private static void WriteCSharpTokens(CodeRenderingContext context, ref readonly PooledArrayBuilder<CSharpIntermediateToken> tokens) 1848foreach (var token in tokens) 1854private static void WriteCSharpToken(CodeRenderingContext context, CSharpIntermediateToken token)
Language\Components\ComponentSplatLoweringPass.cs (1)
42result.Children.AddRange(node.FindDescendantNodes<CSharpIntermediateToken>());
Language\DefaultTagHelperResolutionPhase.ComponentTagHelperResolver.cs (8)
418/// When false (regular bound properties), literals become direct <see cref="CSharpIntermediateToken"/>s. 439if (innerExpr.Children is [CSharpIntermediateToken firstToken, ..]) 453if (!prefixedFirst && token is CSharpIntermediateToken csharpToken) 518/// Merges <see cref="CSharpIntermediateToken"/> children (and content from 530if (child is CSharpIntermediateToken) 536&& expr.Children.All(static inner => inner is CSharpIntermediateToken)) 557if (child is CSharpIntermediateToken csharpToken) 570if (inner is CSharpIntermediateToken innerToken)
Language\DefaultTagHelperResolutionPhase.cs (6)
692if (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"/>, 951private static CSharpIntermediateToken ToCSharpToken(HtmlIntermediateToken htmlToken) 971/// Creates an empty <see cref="CSharpIntermediateToken"/> with an empty string. 973private static CSharpIntermediateToken CreateEmptyCSharpToken(SourceSpan? source)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (7)
752if (innerChild is CSharpIntermediateToken innerToken) 818Func<CSharpIntermediateToken, IntermediateNode> createCSharpWrapper) 829if (innerChild is CSharpIntermediateToken csharpToken) 1106if (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)
323node.Children is [CSharpIntermediateToken token])
Language\Intermediate\ComponentTypeArgumentIntermediateNode.cs (6)
10BoundAttributeDescriptor boundAttribute, CSharpIntermediateToken value) : IntermediateNode 17public CSharpIntermediateToken Value { get; } = value; 28private static CSharpIntermediateToken GetValue(TagHelperPropertyIntermediateNode node) 31[CSharpIntermediateToken t] => t, 32[CSharpExpressionIntermediateNode { Children: [CSharpIntermediateToken t] }] => t, 49private static CSharpIntermediateToken MergeChildTokens(TagHelperPropertyIntermediateNode node)
Language\Intermediate\IntermediateNodeFactory.cs (2)
10public static CSharpIntermediateToken CSharpToken(string content, SourceSpan? source = null) 13public 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)
46if (node.Children.Count == 1 && node.Children[0] is CSharpIntermediateToken token) 62if (nestedExpression.Children[j] is CSharpIntermediateToken csharpToken)