Argument

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

Properties

At

#
public Fragment At { get; }
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.

IsEmpty

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

IsNamed

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

Name

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

Value

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

Methods

Matches

#
public bool Matches(params string[] names)
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.

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

ToString

#
public override string ToString()
Object.ToString