2 instantiations of ChildSyntaxList
Microsoft.CodeAnalysis (1)
Syntax\SyntaxNode.cs (1)
751
return new
ChildSyntaxList
(this);
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
TestSyntaxNodes.vb (1)
143
Assert.NotEqual(xc, New
ChildSyntaxList
)
80 references to ChildSyntaxList
Microsoft.CodeAnalysis (43)
Syntax\ChildSyntaxList.cs (23)
14
public readonly partial struct ChildSyntaxList : IEquatable<
ChildSyntaxList
>, IReadOnlyList<SyntaxNodeOrToken>
26
/// Gets the number of children contained in the <see cref="
ChildSyntaxList
"/>.
62
/// <paramref name="index"/> is less than 0.-or-<paramref name="index" /> is equal to or greater than <see cref="
ChildSyntaxList
.Count"/>. </exception>
403
/// Returns a list which contains all children of <see cref="
ChildSyntaxList
"/> in reversed order.
405
/// <returns><see cref="Reversed"/> which contains all children of <see cref="
ChildSyntaxList
"/> in reversed order</returns>
412
/// <summary>Returns an enumerator that iterates through the <see cref="
ChildSyntaxList
"/>.</summary>
413
/// <returns>A <see cref="Enumerator"/> for the <see cref="
ChildSyntaxList
"/>.</returns>
445
/// <returns>true if the specified object is a <see cref="
ChildSyntaxList
" /> structure and is equal to the current instance; otherwise, false.</returns>
449
return obj is
ChildSyntaxList
list && Equals(list);
452
/// <summary>Determines whether the specified <see cref="
ChildSyntaxList
" /> structure is equal to the current instance.</summary>
453
/// <returns>true if the specified <see cref="
ChildSyntaxList
" /> structure is equal to the current instance; otherwise, false.</returns>
454
/// <param name="other">The <see cref="
ChildSyntaxList
" /> structure to be compared with the current instance.</param>
455
public bool Equals(
ChildSyntaxList
other)
467
/// <summary>Indicates whether two <see cref="
ChildSyntaxList
" /> structures are equal.</summary>
469
/// <param name="list1">The <see cref="
ChildSyntaxList
" /> structure on the left side of the equality operator.</param>
470
/// <param name="list2">The <see cref="
ChildSyntaxList
" /> structure on the right side of the equality operator.</param>
471
public static bool operator ==(
ChildSyntaxList
list1,
ChildSyntaxList
list2)
476
/// <summary>Indicates whether two <see cref="
ChildSyntaxList
" /> structures are unequal.</summary>
478
/// <param name="list1">The <see cref="
ChildSyntaxList
" /> structure on the left side of the inequality operator.</param>
479
/// <param name="list2">The <see cref="
ChildSyntaxList
" /> structure on the right side of the inequality operator.</param>
480
public static bool operator !=(
ChildSyntaxList
list1,
ChildSyntaxList
list2)
Syntax\ChildSyntaxList.Enumerator.cs (3)
15
/// <summary>Enumerates the elements of a <see cref="
ChildSyntaxList
" />.</summary>
41
/// <summary>Advances the enumerator to the next element of the <see cref="
ChildSyntaxList
" />.</summary>
58
/// <returns>The element in the <see cref="
ChildSyntaxList
" /> at the current position of the enumerator.</returns>
Syntax\SyntaxNavigator.cs (6)
92
private static readonly ObjectPool<Stack<
ChildSyntaxList
.Enumerator>> s_childEnumeratorStackPool
93
= new ObjectPool<Stack<
ChildSyntaxList
.Enumerator>>(() => new Stack<
ChildSyntaxList
.Enumerator>(), 10);
138
private static readonly ObjectPool<Stack<
ChildSyntaxList
.Reversed.Enumerator>> s_childReversedEnumeratorStackPool
139
= new ObjectPool<Stack<
ChildSyntaxList
.Reversed.Enumerator>>(() => new Stack<
ChildSyntaxList
.Reversed.Enumerator>(), 10);
Syntax\SyntaxNode.cs (2)
749
public
ChildSyntaxList
ChildNodesAndTokens()
763
SyntaxNodeOrToken childNodeOrToken =
ChildSyntaxList
.ChildThatContainsPosition(this, position);
Syntax\SyntaxNode.Iterators.cs (4)
47
private static readonly ObjectPool<
ChildSyntaxList
.Enumerator[]> s_stackPool = new ObjectPool<
ChildSyntaxList
.Enumerator[]>(() => new
ChildSyntaxList
.Enumerator[16]);
49
private
ChildSyntaxList
.Enumerator[]? _stack;
Syntax\SyntaxNodeOrToken.cs (5)
212
public
ChildSyntaxList
ChildNodesAndTokens()
909
internal static int GetFirstChildIndexSpanningPosition(
ChildSyntaxList
list, int position)
957
var
siblings = parent.ChildNodesAndTokens();
988
private SyntaxNodeOrToken GetNextSiblingFromStart(
ChildSyntaxList
siblings)
1007
private SyntaxNodeOrToken GetNextSiblingWithSearch(
ChildSyntaxList
siblings)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12
public static SyntaxNodeOrToken First(this
ChildSyntaxList
childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
24
public static SyntaxNodeOrToken Last(this
ChildSyntaxList
childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
64
var
childNodesAndTokens = currentNode.ChildNodesAndTokens();
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
369
ChildSyntaxList
children, int index,
416
private static int GetStatementIndex(
ChildSyntaxList
children, SyntaxNode statement)
Microsoft.CodeAnalysis.CSharp (5)
Parser\Blender.Cursor.cs (3)
68
var
siblings = this.CurrentNodeOrToken.Parent.ChildNodesAndTokens();
116
var
children = node.Parent.ChildNodesAndTokens();
155
var child = Microsoft.CodeAnalysis.
ChildSyntaxList
.ItemInternal(node, 0);
Syntax\CSharpSyntaxWalker.cs (2)
39
var slotData = new
ChildSyntaxList
.SlotData(node);
43
var child =
ChildSyntaxList
.ItemInternal((CSharpSyntaxNode)node, i, ref slotData);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (10)
IncrementalParsing\IncrementalParsingTests.cs (2)
3674
var
incChildren = incNode.ChildNodesAndTokens();
3675
var
fullChildren = fullNode.ChildNodesAndTokens();
Parsing\ParsingTests.cs (1)
262
var stack = new Stack<
ChildSyntaxList
.Enumerator>(24);
Syntax\ChildSyntaxListTests.cs (4)
23
EqualityTesting.AssertEqual(default(
ChildSyntaxList
), default(
ChildSyntaxList
));
33
EqualityTesting.AssertEqual(default(
ChildSyntaxList
.Reversed), default(
ChildSyntaxList
.Reversed));
Syntax\SyntaxAnnotationTests.cs (1)
286
var
children = firstNode.ChildNodesAndTokens();
Syntax\SyntaxListTests.cs (1)
297
var item =
ChildSyntaxList
.ChildThatContainsPosition(parsedArgumentList, position);
Syntax\SyntaxNodeTests.cs (1)
966
private void TestReverse(
ChildSyntaxList
children)
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (2)
369
ChildSyntaxList
children, int index,
416
private static int GetStatementIndex(
ChildSyntaxList
children, SyntaxNode statement)
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\CompilationExtensions.cs (1)
397
var
childNodesAndTokens = node.ChildNodesAndTokens();
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicSyntaxNode.vb (1)
233
Private Shared Sub PushNodesWithErrors(stack As Stack(Of SyntaxNodeOrToken), nodes As
ChildSyntaxList
)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Syntax\SyntaxListTests.vb (2)
219
Dim openParen =
ChildSyntaxList
.ChildThatContainsPosition(parsedArgumentList, 0)
226
Dim item =
ChildSyntaxList
.ChildThatContainsPosition(parsedArgumentList, position)
TestSyntaxNodes.vb (2)
141
Dim xc As
ChildSyntaxList
= children
241
Private Sub VerifyListSpans(list As
ChildSyntaxList
, expectedFullSpan As TextSpan)
Microsoft.CodeAnalysis.Workspaces (7)
Classification\SyntaxClassification\SyntacticChangeRangeComputer.cs (4)
38
private static readonly ObjectPool<Stack<
ChildSyntaxList
.Enumerator>> s_enumeratorPool = new(() => new());
39
private static readonly ObjectPool<Stack<
ChildSyntaxList
.Reversed.Enumerator>> s_reversedEnumeratorPool = new(() => new());
242
private static bool TryGetStackTopNodeOrToken(Stack<
ChildSyntaxList
.Enumerator> stack, out SyntaxNodeOrToken syntaxNodeOrToken)
259
private static bool TryGetStackTopNodeOrToken(Stack<
ChildSyntaxList
.Reversed.Enumerator> stack, out SyntaxNodeOrToken syntaxNodeOrToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12
public static SyntaxNodeOrToken First(this
ChildSyntaxList
childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
24
public static SyntaxNodeOrToken Last(this
ChildSyntaxList
childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
64
var
childNodesAndTokens = currentNode.ChildNodesAndTokens();
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
337
var
childNodesAndTokens = node.ChildNodesAndTokens();
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (1)
337
var
childNodesAndTokens = node.ChildNodesAndTokens();