AST topic

Classes representing Sass's abstract syntax tree.

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

Classes

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.
AttributeSelector AST
An attribute selector.
BinaryOperationExpression AST
A binary operator, as in 1 + 2 or $this and $other.
BooleanExpression AST
A boolean literal, true or false.
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).
ClassSelector AST
A class selector.
ColorExpression AST
A color literal.
ComplexSelector AST Parsing
A complex selector.
ComplexSelectorComponent AST
A component of a ComplexSelector.
CompoundSelector AST Parsing
A compound selector.
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.
IDSelector AST
An ID selector.
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.
ParentSelector AST
A selector that matches the parent in the Sass stylesheet.
ParentStatement<T extends List<Statement>?> AST
A Statement that can have child statements.
PlaceholderSelector AST
A placeholder selector.
PseudoSelector AST
A pseudo-class or pseudo-element selector.
QualifiedName AST
A qualified name.
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.
Selector AST
A node in the abstract syntax tree for a selector.
SelectorExpression AST
A parent selector reference, &.
SelectorList AST Parsing
A selector list.
SilentComment AST
A silent Sass-style comment.
SimpleSelector AST Parsing
An abstract superclass for simple selectors.
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.
SupportsExpression AST
An expression-level @supports condition.
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.
TypeSelector AST
A type selector.
UnaryOperationExpression AST
A unary operator, as in +$var or not fn().
UniversalSelector AST
Matches any element in the given namespace.
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.

Enums

BinaryOperator AST
A binary operator constant.
Combinator AST
A combinator that defines the relationship between selectors in a ComplexSelector.
UnaryOperator AST
A unary operator constant.