Vixen
02b45cc4
csharp
public readonly struct SeparatedSyntaxList<TNode> where TNode : SyntaxNode

A list of nodes separated by tokens (e.g. comma-separated arguments). Backed by a single green list whose slots interleave elements and separators: element, separator, element, separator, element. Elements occupy even slots, separators the odd ones.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (3)

  • public int Count

    Number of elements, ignoring separators.

  • public int SeparatorCount

    Number of separators — one fewer than Count, unless the list has a trailing separator, in which case the two are equal.

  • public TNode this[int index]

    The element at , skipping separators.

Methods (8)

  • public bool Any()

    Whether the list has any elements.

  • public SyntaxToken GetSeparator(int index)

    The separator following element .

  • public IEnumerator<TNode> GetEnumerator()

    Enumerates the elements, skipping separators.

  • public static bool operator ==(SeparatedSyntaxList<TNode> left, SeparatedSyntaxList<TNode> right)

    Reference equality on the backing node. Two lists are equal when they are the same list, not when they happen to hold equal elements.

  • public static bool operator !=(SeparatedSyntaxList<TNode> left, SeparatedSyntaxList<TNode> right)
  • public bool Equals(SeparatedSyntaxList<TNode> other)
  • public override bool Equals(object? obj)

    Indicates whether this instance and a specified object are equal.

  • public override int GetHashCode()

    Hashes the backing node, consistent with the reference equality above.

Used by (20)

  • ArgumentListSyntaxVixen.Raven
  • AttributeArgumentListSyntaxVixen.Raven
  • AttributeListSyntaxVixen.Raven
  • BaseArgumentListSyntaxVixen.Raven
  • BaseListSyntaxVixen.Raven
  • BinderVixen.Raven
  • BracketedArgumentListSyntaxVixen.Raven
  • CollectionExpressionSyntaxVixen.Raven
  • CompilationVixen.Raven
  • DeclarationFactsVixen.Raven
  • EnumDeclarationSyntaxVixen.Raven
  • ParameterListSyntaxVixen.Raven
  • RavenParserVixen.Raven
  • SyntaxAntlrVisitorVixen.Raven.Tests
  • SyntaxFactoryVixen.Raven
  • TupleExpressionSyntaxVixen.Raven
  • TupleTypeSyntaxVixen.Raven
  • TypeArgumentListSyntaxVixen.Raven
  • TypeParameterConstraintClauseSyntaxVixen.Raven
  • TypeParameterListSyntaxVixen.Raven