ChildSyntaxList Struct

The children of a node, with the lists among them flattened away.

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

NameDescription
ChildSyntaxList.EnumeratorWalks a ChildSyntaxList without allocating.
ChildSyntaxList.ReversedThe children of a node, from last to first.

Properties

NameDescription
Count
public int Count { get; }

Property value

int

No documentation is available.

Indexers

NameDescription
this[int]
public SyntaxNodeOrToken this[int index] { get; }

Parameters

index int

Property value

SyntaxNodeOrToken

No documentation is available.

Methods

NameDescription
Any()
Equals(ChildSyntaxList)
Equals(object?)
First()
FirstOrDefault()
GetEnumerator()
GetHashCode()
Last()
LastOrDefault()
Reverse()Enumerates the children from last to first.
System.Collections.Generic.IEnumerable<Meziantou.Framework.Language.SyntaxNodeOrToken>.GetEnumerator()
System.Collections.IEnumerable.GetEnumerator()
public bool Any()

Returns

bool

No documentation is available.

Equals overloads

Equals(ChildSyntaxList)

ChildSyntaxList.cs
public bool Equals(ChildSyntaxList other)
Parameters
other ChildSyntaxList
Returns

bool

No documentation is available.

Equals(object?)

ChildSyntaxList.cs
public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

public SyntaxNodeOrToken First()

No documentation is available.

FirstOrDefault()

ChildSyntaxList.cs
public SyntaxNodeOrToken FirstOrDefault()

No documentation is available.

GetEnumerator()

ChildSyntaxList.cs
public ChildSyntaxList.Enumerator GetEnumerator()

No documentation is available.

GetHashCode()

ChildSyntaxList.cs
public override int GetHashCode()

Returns

int

No documentation is available.

public SyntaxNodeOrToken Last()

No documentation is available.

LastOrDefault()

ChildSyntaxList.cs
public SyntaxNodeOrToken LastOrDefault()

No documentation is available.

Enumerates the children from last to first.

public ChildSyntaxList.Reversed Reverse()

System.Collections.Generic.IEnumerable<Meziantou.Framework.Language.SyntaxNodeOrToken>.GetEnumerator()

ChildSyntaxList.cs

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

ChildSyntaxList.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.

Operators

NameDescription
operator ==(ChildSyntaxList, ChildSyntaxList)
operator !=(ChildSyntaxList, ChildSyntaxList)

operator ==(ChildSyntaxList, ChildSyntaxList)

ChildSyntaxList.cs
public static bool operator ==(ChildSyntaxList left, ChildSyntaxList right)

Parameters

left ChildSyntaxList
right ChildSyntaxList

Returns

bool

No documentation is available.

operator !=(ChildSyntaxList, ChildSyntaxList)

ChildSyntaxList.cs
public static bool operator !=(ChildSyntaxList left, ChildSyntaxList right)

Parameters

left ChildSyntaxList
right ChildSyntaxList

Returns

bool

No documentation is available.