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

Enums

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