ArgumentDeclaration class final

An argument declaration, as for a function or mixin definition.

Implemented types

Constructors

ArgumentDeclaration(Iterable<Argument> arguments, FileSpan span, {String? restArgument})
ArgumentDeclaration.empty(FileSpan span)
Creates a declaration that declares no arguments.
ArgumentDeclaration.parse(String contents, {Object? url})
Parses an argument declaration from contents, which should be of the form @rule name(args) {.
factory

Properties

arguments List<Argument>
The arguments that are taken.
final
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Returns whether this declaration takes no arguments.
no setter
restArgument String?
The name of the rest argument (as in $args...), or null if none was declared.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
span → FileSpan
The source span associated with the node.
final
spanWithName → FileSpan
Returns span expanded to include an identifier immediately before the declaration, if possible.
no setter

Methods

matches(int positional, Set<String> names) bool
Returns whether positional and names are valid for this argument declaration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
verify(int positional, Set<String> names) → void
Throws a SassScriptException if positional and names aren't valid for this argument declaration.

Operators

operator ==(Object other) bool
The equality operator.
inherited