ChildSyntaxList Struct
The children of a node, with the lists among them flattened away.
public readonly struct ChildSyntaxList : IEnumerable<SyntaxNodeOrToken>, IReadOnlyCollection<SyntaxNodeOrToken>, IReadOnlyList<SyntaxNodeOrToken>, IEnumerable, IEquatable<ChildSyntaxList>Remarks
A node holds its children in numbered slots, and a slot may hold a whole list. This type presents both cases the same way, so a caller sees a flat sequence of nodes and tokens and never a list of its own.
Reading a child walks the slots to find it, so it costs more than an array lookup, and enumerating pays that walk once per step rather than carrying a running position from one to the next. The walk is short -- it is over the slots of the node, not over the children of a list -- and the position of a child already created is read straight off it.
- Implements
Nested types
| Name | Description |
|---|---|
| ChildSyntaxList.Enumerator | Walks a ChildSyntaxList without allocating. |
| ChildSyntaxList.Reversed | The children of a node, from last to first. |
Properties
| Name | Description |
|---|---|
| Count |
Count
ChildSyntaxList.csIndexers
| Name | Description |
|---|---|
| this[int] |
this[int]
ChildSyntaxList.cspublic SyntaxNodeOrToken this[int index] { get; }No documentation is available.
Methods
Any()
ChildSyntaxList.csEquals overloads
Equals(ChildSyntaxList)
ChildSyntaxList.cspublic bool Equals(ChildSyntaxList other)No documentation is available.
Equals(object?)
ChildSyntaxList.csFirst()
ChildSyntaxList.csFirstOrDefault()
ChildSyntaxList.csGetEnumerator()
ChildSyntaxList.csGetHashCode()
ChildSyntaxList.csLast()
ChildSyntaxList.csLastOrDefault()
ChildSyntaxList.csReverse()
ChildSyntaxList.csSystem.Collections.Generic.IEnumerable<Meziantou.Framework.Language.SyntaxNodeOrToken>.GetEnumerator()
ChildSyntaxList.csIEnumerator<SyntaxNodeOrToken> IEnumerable<SyntaxNodeOrToken>.GetEnumerator()No documentation is available.
System.Collections.IEnumerable.GetEnumerator()
ChildSyntaxList.csOperators
| Name | Description |
|---|---|
| operator ==(ChildSyntaxList, ChildSyntaxList) | |
| operator !=(ChildSyntaxList, ChildSyntaxList) |
operator ==(ChildSyntaxList, ChildSyntaxList)
ChildSyntaxList.cspublic static bool operator ==(ChildSyntaxList left, ChildSyntaxList right)No documentation is available.
operator !=(ChildSyntaxList, ChildSyntaxList)
ChildSyntaxList.cspublic static bool operator !=(ChildSyntaxList left, ChildSyntaxList right)No documentation is available.