Argument

References
public sealed class Argument
One argument within a bracketed list, i.e. the "y: 5" in "point(1, y: 5)".

Properties

At

#
Gets the fragment to blame when this argument is at fault. That is the name when there is one, so that a complaint about an unknown argument underlines the name rather than the value behind it.
public Fragment At { get; }

IsEmpty

#
Gets whether this argument has no value at all, as the middle one in "rgb(1,,3)" does.
public bool IsEmpty { get; }

IsNamed

#
Gets whether this argument was given by name rather than by position.
public bool IsNamed { get; }

Name

#
Gets the name of this argument, or null when it was given by position.
public string Name { get; }

Value

#
Gets the value of this argument, ready to be handed to an interpreter.
public Fragments Value { get; }

Methods

Matches

#
Test whether this argument was given under one of these names.

Useful when the alias changes the meaning rather than merely the spelling, as "d: 10" and "r: 10" do on a circle.

public bool Matches(
params string[]
names
Names to test against.
)

ToString

#
public override string ToString()
Object.ToString