Arguments

References
public sealed class Arguments : IEnumerable<Argument>
The arguments inside a bracketed list, each given either by position or by name.

Arguments are separated by top level commas, or, when there are none, by whitespace, so that "rgb(1, 0.5, 0)" and "rgb(1 0.5 0)" agree. An argument is named when a word is followed by a colon; a number before a colon is left alone, which is what keeps "13:45" a time rather than an argument called thirteen.

Properties

AllNamed

#
Gets whether every argument was given by name.
public bool AllNamed { get; }

AllPositional

#
Gets whether every argument was given by position.
public bool AllPositional { get; }

Count

#
Gets the number of arguments.
public int Count { get; }

Indexers

this[]

#
public Argument this[
index
] { get; }

Methods

Create

#
Cut the interior of a bracketed list into its arguments.
public static Arguments Create(
interior
Fragments between the brackets.
)

GetEnumerator

#
public IEnumerator<Argument> GetEnumerator()
Explicit

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()

ToString

#
public override string ToString()
Object.ToString

TryBind

#
Match these arguments against a signature, yielding the value for each entry in it, or null where nothing was supplied.

Positional arguments fill the signature from the left, named ones fill by name wherever they appear, and a positional argument may not follow a named one; "point(x: 1, 2)" says nothing about which slot the two belongs to.

public bool TryBind(
syntax,
Description of each argument the notation accepts.
out Argument[]
bound,
Argument for each entry, or null where absent.
out string
failure,
Description of the mismatch, if there was one.
at
Fragment to blame for the mismatch.
)