AST Topic

Classes representing Sass's abstract syntax tree.

Certain AST classes, most notably Stylesheet, have parse() constructors that parse ASTs from string sources.


Argument AST
An argument declared as part of an ArgumentDeclaration.
ArgumentDeclaration AST Parsing
An argument declaration, as for a function or mixin definition.
ArgumentInvocation AST
A set of arguments passed in to a function or mixin.
AstNode AST
A node in an abstract syntax tree. [...]
AtRootRule AST
An @at-root rule. [...]
AtRule AST
An unknown at-rule.
BinaryOperationExpression AST
A binary operator, as in 1 + 2 or $this and $other.
BinaryOperator AST
A binary operator constant.
BooleanExpression AST
A boolean literal, true or false.
CalculationExpression AST
A calculation literal.
CallableDeclaration AST
An abstract class for callables (functions or mixins) that are declared in user code.
CallableInvocation AST
An abstract class for invoking a callable (a function or mixin).
ColorExpression AST
A color literal.
ConfiguredVariable AST
A variable configured by a with clause in a @use or @forward rule.
ContentBlock AST
An anonymous block of code that's invoked for a ContentRule.
ContentRule AST
A @content rule. [...]
DebugRule AST
A @debug rule. [...]
Declaration AST
A declaration (that is, a name: value pair).
DynamicImport AST
An import that will load a Sass file at runtime.
EachRule AST
An @each rule. [...]
ElseClause AST
An @else clause in an @if rule.
ErrorRule AST
An @error rule. [...]
Expression AST Parsing
A SassScript expression in a Sass syntax tree.
ExtendRule AST
An @extend rule. [...]
ForRule AST
A @for rule. [...]
ForwardRule AST
A @forward rule.
FunctionExpression AST
A function invocation. [...]
FunctionRule AST
A function declaration. [...]
IfClause AST
An @if or @else if clause in an @if rule.
IfExpression AST
A ternary expression. [...]
IfRule AST
An @if rule. [...]
IfRuleClause AST
The superclass of @if and @else clauses.
Import AST
An abstract superclass for different types of import.
ImportRule AST
An @import rule.
IncludeRule AST
A mixin invocation.
InterpolatedFunctionExpression AST
An interpolated function invocation. [...]
Interpolation AST
Plain text interpolated with Sass expressions.
ListExpression AST
A list literal.
LoudComment AST
A loud CSS-style comment.
MapExpression AST
A map literal.
MediaRule AST
A @media rule.
MixinRule AST
A mixin declaration. [...]
NullExpression AST
A null literal.
NumberExpression AST
A number literal.
ParenthesizedExpression AST
An expression wrapped in parentheses.
ParentStatement<T extends List<Statement>?> AST
A Statement that can have child statements. [...]
ReturnRule AST
A @return rule. [...]
SassDeclaration AST
A common interface for any node that declares a Sass member.
SassDependency AST
A common interface for UseRules, ForwardRules, and DynamicImports.
SassNode AST
A node in the abstract syntax tree for an unevaluated Sass or SCSS file.
SassReference AST
A common interface for any node that references a Sass member.
SelectorExpression AST
A parent selector reference, &.
SilentComment AST
A silent Sass-style comment.
Statement AST
A statement in a Sass syntax tree.
StaticImport AST
An import that produces a plain CSS @import rule.
StringExpression AST
A string literal.
StyleRule AST
A style rule. [...]
Stylesheet AST Parsing
A Sass stylesheet. [...]
SupportsAnything AST
A supports condition that represents the forwards-compatible <general-enclosed> production.
SupportsCondition AST
An abstract class for defining the condition a @supports rule selects.
SupportsDeclaration AST
A condition that selects for browsers where a given declaration is supported.
SupportsFunction AST
A function-syntax condition.
SupportsInterpolation AST
An interpolated condition.
SupportsNegation AST
A negated condition.
SupportsOperation AST
An operation defining the relationship between two conditions.
SupportsRule AST
A @supports rule.
UnaryOperationExpression AST
A unary operator, as in +$var or not fn().
UnaryOperator AST
A unary operator constant.
UseRule AST
A @use rule.
ValueExpression AST
An expression that directly embeds a Value. [...]
VariableDeclaration AST
A variable declaration. [...]
VariableExpression AST
A Sass variable.
WarnRule AST
A @warn rule. [...]
WhileRule AST
A @while rule. [...]