Visitor topic

Classes that implement the visitor pattern for traversing the Sass AST. Callers can either implement interfaces like StatementVisitor from scratch to handle all Sass node types, or extend helper classes like RecursiveStatementVisitor which traverse the entire AST to handle only specific nodes.

Classes

ExpressionVisitor<T>
An interface for visitors that traverse SassScript expressions.
SelectorVisitor<T>
An interface for visitors that traverse selectors.
StatementVisitor<T>
An interface for visitors that traverse Sass statements.

Mixins

AstSearchVisitor<T>
A visitor that recursively traverses each statement and expression in a Sass AST whose visit* methods default to returning null, but which returns the first non-null value returned by any method.
RecursiveAstVisitor
A visitor that recursively traverses each statement and expression in a Sass AST.
RecursiveSelectorVisitor
A visitor that recursively traverses each component of a Selector AST.
RecursiveStatementVisitor
A visitor that recursively traverses each statement in a Sass AST.
ReplaceExpressionVisitor
A visitor that recursively traverses each expression in a SassScript AST and replaces its contents with the values returned by nested recursion.
SelectorSearchVisitor<T>
A SelectorVisitor whose visit* methods default to returning null, but which returns the first non-null value returned by any method.
StatementSearchVisitor<T>
A StatementVisitor whose visit* methods default to returning null, but which returns the first non-null value returned by any method.