SassArgumentList

Swift
public final class SassArgumentList: SassList, Sendable

A Sass value representing a $arg... function argument list.

This type is a SassList holding positional arguments with an addition set of named keyword arguments. See the Sass docs.

warning

You’ll typically use this type to access arguments passed in this way to a custom Sass function. Be careful in other scenarios: the keyword argument part of the type is excluded from equality and listification, meaning it is easy to accidentally lose that part of the type when passing instances through generic SassValue code.


Topics

Initializers

init<C>(C, keywords: [String : SassValue], keywordsObserver: () -> Void, separator: Separator)

Initialize a new argument list with the contents of a Swift sequence.

Declaration
Swift
public init<C>(
    _ positional: C,
    keywords: [String: SassValue] = [:],
    keywordsObserver: @escaping () -> Void = {},
    separator: Separator = .space) where C: Sequence, C.Element == SassValue
Parameters
positional

The SequenceSequence whose contents should make up the positional arguments of the argument list.

keywords

The keywords and values to make the keyword arguments of the argument list. Default is no keyword arguments.

keywordsObserver

A callback to be invoked when the keywords are accessed. Used by compiler implementations. Default is an observer that does nothing.

separator

The separator character to use in any CSS generated from the list. If sequence contains more than one element then an .undecided separator is promoted to .space.

Keyword arguments

var keywords: [String : SassValue]

The argument list’s keyword arguments.

Any keywords observer is notified on every access to this property.

Declaration
Swift
public var keywords: [String: SassValue] { get }

Misc

func accept<V, R>(visitor: V) -> R

Call the corresponding method of visitor against this object.

Declaration
Swift
public override func accept<V, R>(visitor: V) throws -> R
where V: SassValueVisitor, R == V.ReturnType

var description: String

A short description of the value.

Declaration
Swift
public override var description: String { get }