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
- ArgumentList
- A set of arguments passed in to a function or mixin.
- AstNode
- A node in an abstract syntax tree.
- AtRootRule
-
An
@at-rootrule. - AtRule
- An unknown at-rule.
- AttributeSelector
- An attribute selector.
- BinaryOperationExpression
-
A binary operator, as in
1 + 2or$this and $other. - BooleanExpression
-
A boolean literal,
trueorfalse. - 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
withclause in a@useor@forwardrule. - ContentBlock
- An anonymous block of code that's invoked for a ContentRule.
- ContentRule
-
A
@contentrule. - DebugRule
-
A
@debugrule. - Declaration
-
A declaration (that is, a
name: valuepair). - DynamicImport
- An import that will load a Sass file at runtime.
- EachRule
-
An
@eachrule. - ElseClause
-
An
@elseclause in an@ifrule. - ErrorRule
-
An
@errorrule. - Expression
- A SassScript expression in a Sass syntax tree.
- ExtendRule
-
An
@extendrule. - ForRule
-
A
@forrule. - ForwardRule
-
A
@forwardrule. - FunctionExpression
- A function invocation.
- FunctionRule
- A function declaration.
- IDSelector
- An ID selector.
- IfClause
-
An
@ifor@else ifclause in an@ifrule. - IfExpression
- A ternary expression.
- IfRule
-
An
@ifrule. - IfRuleClause
-
The superclass of
@ifand@elseclauses. - Import
- An abstract superclass for different types of import.
- ImportRule
-
An
@importrule. - IncludeRule
- A mixin invocation.
- InterpolatedAttributeSelector
- An attribute selector.
- InterpolatedClassSelector
- A class selector.
- InterpolatedComplexSelector
- A complex selector before interoplation is resolved.
- InterpolatedComplexSelectorComponent
- A component of a InterpolatedComplexSelector.
- InterpolatedCompoundSelector
- A compound selector before interoplation is resolved.
- InterpolatedFunctionExpression
- An interpolated function invocation.
- InterpolatedIDSelector
- An ID selector.
- InterpolatedParentSelector
- A parent selector.
- InterpolatedPlaceholderSelector
- A placeholder selector.
- InterpolatedPseudoSelector
- A psueod-class or pseudo-element selector.
- InterpolatedQualifiedName
- A component of a InterpolatedComplexSelector.
- InterpolatedSelector
- A simple selector before interoplation is resolved.
- InterpolatedSelectorList
- A selector list before interoplation is resolved.
- InterpolatedSimpleSelector
- A simple selector before interoplation is resolved.
- InterpolatedTypeSelector
- An type selector.
- InterpolatedUniversalSelector
- A universal selector.
- Interpolation
- Plain text interpolated with Sass expressions.
- ListExpression
- A list literal.
- LoudComment
- A loud CSS-style comment.
- MapExpression
- A map literal.
- MediaRule
-
A
@mediarule. - MixinRule
- A mixin declaration.
- NullExpression
- A null literal.
- NumberExpression
- A number literal.
- Parameter
- An parameter declared as part of an ParameterList.
- ParameterList
- An parameter declaration, as for a function or mixin definition.
- 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
@returnrule. - 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
@importrule. - 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
@supportsrule selects. - SupportsDeclaration
- A condition that selects for browsers where a given declaration is supported.
- SupportsExpression
-
An expression-level
@supportscondition. - SupportsFunction
- A function-syntax condition.
- SupportsInterpolation
- An interpolated condition.
- SupportsNegation
- A negated condition.
- SupportsOperation
- An operation defining the relationship between two conditions.
- SupportsRule
-
A
@supportsrule. - TypeSelector
- A type selector.
- UnaryOperationExpression
-
A unary operator, as in
+$varornot fn(). - UniversalSelector
- Matches any element in the given namespace.
- UseRule
-
A
@userule. - ValueExpression
- An expression that directly embeds a Value.
- VariableDeclaration
- A variable declaration.
- VariableExpression
- A Sass variable.
- WarnRule
-
A
@warnrule. - WhileRule
-
A
@whilerule.
Enums
- AttributeOperator
- An operator that defines the semantics of an AttributeSelector.
- BinaryOperator
- A binary operator constant.
- Combinator
- A combinator that defines the relationship between selectors in a ComplexSelector.
- UnaryOperator
- A unary operator constant.