Evaluator
MMO\client\scs · 1 symbol · generated 5 Oct 2026
Evaluator
Evaluator.php:22Evaluates expressions and renders css values.
- Namespace
MMO\client\scs- See
Compilerwhich owns the definitions this evaluator reads.
Index
| compiler | ||
| binary($node, $scope, $selector) | ||
| call($node, $scope, $selector) | ||
| compute($operator, $left, $right, $node) | ||
| context($node) | ||
| dig($value, $path) | Walk a dotted path inside a value. | |
| evaluate($node, $scope, $selector) | Evaluate any expression node. | |
| index($node, $scope, $selector) | ||
| map($node, $scope, $selector) | ||
| member($value, $key, $node) | Read a key of a map, or an index of a list. | |
| render($node, $scope, $selector, $quote) | Render a css value, a selector or an at-rule prelude, keeping the source's own spacing. | |
| string($node, $scope, $selector) | Build a string whose ${...} parts are evaluated. | |
| unary($node, $scope, $selector) | ||
| unitOf($operator, $left, $right, $node) | The unit of an arithmetic result. | |
| valueOf($node, $scope, $selector) | Evaluate a value list as a single value: a lone term keeps its type (a map stays a map, a number stays a number), a comma separated list becomes a list, anything else becomes the css text it render… | |
| variable($node, $scope) | Resolve $name / $name.path: a compile-time variable first, a theme token second. | |
| __construct($compiler) |
Properties1
compiler
- Type
- Compiler
Methods16
binary($node, $scope, $selector)
Evaluator.php:224| $node | BinaryNode | |
| $scope | Scope | |
| $selector | null | string | |
| returns | Value |
call($node, $scope, $selector)
Evaluator.php:324compute($operator, $left, $right, $node)
Evaluator.php:271context($node)
Evaluator.php:165| $node | ContextNode | |
| returns | Value |
dig($value, $path)
Evaluator.php:157Walk a dotted path inside a value.
evaluate($node, $scope, $selector)
Evaluator.php:32Evaluate any expression node.
index($node, $scope, $selector)
Evaluator.php:176map($node, $scope, $selector)
Evaluator.php:201member($value, $key, $node)
Evaluator.php:185Read a key of a map, or an index of a list.
render($node, $scope, $selector, $quote)
Evaluator.php:69Render a css value, a selector or an at-rule prelude, keeping the source's own spacing.
string($node, $scope, $selector)
Evaluator.php:52Build a string whose ${...} parts are evaluated.
| $node | StringNode | |
| $scope | Scope | |
| $selector | null | string | |
| returns | Value |
unary($node, $scope, $selector)
Evaluator.php:213unitOf($operator, $left, $right, $node)
Evaluator.php:289The unit of an arithmetic result. Incompatible units are a compile error (the spec, 5.4).
valueOf($node, $scope, $selector)
Evaluator.php:85Evaluate a value list as a single value: a lone term keeps its type (a map stays a map, a number stays a number), a comma separated list becomes a list, anything else becomes the css text it renders to.
| $node | ValueListNode | |
| $scope | Scope | |
| $selector = null | null | string | |
| returns | Value |
variable($node, $scope)
Evaluator.php:116Resolve $name / $name.path: a compile-time variable first, a theme token second.
- See
thespec, 38 and 39 -- a theme token never becomes its value, it becomesvar(--name-path).
| $node | VariableRefNode | |
| $scope | Scope | |
| returns | Value |
__construct($compiler)
Evaluator.php:23| $compiler | Compiler |