Class Sass::Tree::Visitors::Perform
In: lib/sass/tree/visitors/perform.rb
Parent: Sass::Tree::Visitors::Base

A visitor for converting a dynamic Sass tree into a static Sass tree.

Methods

Public Class methods

@param root [Tree::Node] The root node of the tree to visit. @param environment [Sass::Environment] The lexical environment. @return [Tree::Node] The resulting tree of static nodes.

Protected Instance methods

If an exception is raised, this adds proper metadata to the backtrace.

Keeps track of the current environment.

Removes this node from the tree if it‘s a silent comment.

Prints the expression to STDERR.

Runs the child nodes once for each value in the list.

Runs SassScript interpolation in the selector, and then parses the result into a {Sass::Selector::CommaSequence}.

Runs the child nodes once for each time through the loop, varying the variable each time.

Loads the function into the environment.

Runs the child nodes if the conditional expression is true; otherwise, tries the else nodes.

Returns a static DirectiveNode if this is importing a CSS file, or parses and includes the imported Sass file.

Runs a mixin.

Loads a mixin into the environment.

Runs any SassScript that may be embedded in a property.

Returns the value of the expression.

Sets the options on the environment if this is the top-level root.

Runs SassScript interpolation in the selector, and then parses the result into a {Sass::Selector::CommaSequence}.

Loads the new variable value into the environment.

Prints the expression to STDERR with a stylesheet trace.

Runs the child nodes until the continuation expression becomes false.

Runs a block of code with the current environment replaced with the given one.

@param env [Sass::Environment] The new environment for the duration of the block. @yield A block in which the environment is set to `env`. @return [Object] The return value of the block.

[Validate]