You are here

public function SassNode::evaluate in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassNode.php \SassNode::evaluate()

Evaluates a SassScript expression.

Parameters

string expression to evaluate:

SassContext the context in which the expression is evaluated:

Return value

SassLiteral value of parsed expression

3 calls to SassNode::evaluate()
SassFunctionDefinitionNode::execute in phpsass/tree/SassFunctionDefinitionNode.php
SassMixinNode::parse in phpsass/tree/SassMixinNode.php
Parse this node. Set passed arguments and any optional arguments not passed to their defaults, then render the children of the mixin definition.
SassVariableNode::parse in phpsass/tree/SassVariableNode.php
Parse this node. Sets the variable in the current context.

File

phpsass/tree/SassNode.php, line 305

Class

SassNode
SassNode class. Base class for all Sass nodes. @package PHamlP @subpackage Sass.tree

Code

public function evaluate($expression, $context, $x = null) {
  $context->node = $this;
  return $this->script
    ->evaluate($expression, $context, $x);
}