module

Hwaro::Assets::Sass::Expr

Constants

RAW_SPAN_FNS = ["url", "var", "env", "attr", "counter", "counters", "expression", "format", "local"] of ::String

Function names whose parenthesized span belongs to CSS and must pass through verbatim, never parsed as Sass arguments.

Class methods

coerce(text : String) : Value

Coerces stored text back into a typed value ("1px" -> Number, "(a: 1)" -> Map). Unparseable text stays Raw — lazily typed strings are the storage model.

Source
computes?(node : Node, host : Host) : Bool

True when evaluating the tree would do real work: any operator, not, or a call that resolves to a known (user or built-in) function. Bare literals/variables/lists resolve identically via the legacy path, so they don't count — that is what keeps existing output byte-identical.

Source
parse(template : Ast::TextTemplate) : Node | Nil

Parses a template into an expression tree; nil when the text is outside the expression grammar (lenient callers then use the legacy verbatim path).

Source
parse!(template : Ast::TextTemplate) : Node

Strict parse for control-flow contexts.

Source

Nested types