\SassVariableNode
SassVariableNode class.
Represents a variable.
Synopsis
class SassVariableNode
extends SassNode
{
- // constants
- const MATCH = '/^([!$])([\w-]+)\s*:?\s*((\|\|)?=)?\s*(.+?)\s*(!default)?;?$/i';
- const IDENTIFIER = 1;
- const NAME = 2;
- const SASS_ASSIGNMENT = 3;
- const SASS_DEFAULT = 4;
- const VALUE = 5;
- const SCSS_DEFAULT = 6;
- const SASS_IDENTIFIER = '!';
- const SCSS_IDENTIFIER = '$';
- // members
- private $name;
- private $value;
- private $isDefault;
- // Inherited members from SassNode
- public SassNode $parent;
- public SassNode $root;
- public array $children;
- public $token;
- // methods
- public SassVariableNode __construct()
- public array parse()
- public static boolean isa()
- // Inherited methods from SassNode
- public SassNode __construct()
- public mixed __get()
- public SassNode __set()
- public void __clone()
- public array hasParent()
- public array getParent()
- public SassNode addChild()
- public boolean hasChildren()
- public array getChildren()
- public boolean isChildOf()
- public SassNode getLastChild()
- public integer getLevel()
- public string getSource()
- public boolean getDebug_info()
- public string getLine()
- public boolean getLine_numbers()
- public string getFilename()
- public SassParser getParser()
- public string getPropertySyntax()
- public SassScriptParser getScript()
- public SassRenderer getRenderer()
- public string getStyle()
- public void inDirective()
- public void inSassScriptDirective()
- public SassLiteral evaluate()
- public string interpolate()
- public void addWarning()
- public array parseChildren()
- public static boolean isa()
Hierarchy
Extends
Constants
Name | Value |
---|---|
MATCH | '/^([!$])([\w-]+)\s*:?\s*((\|\|)?=)?\s*(.+?)\s*(!default)?;?$/i' |
IDENTIFIER | 1 |
NAME | 2 |
SASS_ASSIGNMENT | 3 |
SASS_DEFAULT | 4 |
VALUE | 5 |
SCSS_DEFAULT | 6 |
SASS_IDENTIFIER | '!' |
SCSS_IDENTIFIER | '$' |
Members
private
- $isDefault — boolean
- $name — string
- $value — string
public
Methods
public
- __construct() — SassVariableNode constructor.
- isa() — Returns a value indicating if the token represents this type of node.
- parse() — Parse this node.
Inherited from SassNode
public
- __clone() — Resets children when cloned
- __get() — Getter.
- __set() — Setter.
- addChild() — Adds a child to this node.
- addWarning() — Adds a warning to the node.
- evaluate() — Evaluates a SassScript expression.
- getChildren() — Returns the node's children
- getDebug_info() — Returns the debug_info option setting for this node
- getFilename() — Returns the filename for this node
- getLastChild() — Returns the last child node of this node.
- getLevel() — Returns the level of this node.
- getLine() — Returns the line number for this node
- getLine_numbers() — Returns the line_numbers option setting for this node
- getParent() — Returns the node's parent
- getParser() — Returns the Sass parser.
- getPropertySyntax() — Returns the property syntax being used.
- getRenderer() — Returns the renderer.
- getScript() — Returns the SassScript parser.
- getSource() — Returns the source for this node
- getStyle() — Returns the render style of the document tree.
- hasChildren() — Returns a value indicating if this node has children
- hasParent() — Return a value indicating if this node has a parent
- inDirective() — Returns a value indicating whether this node is in a directive
- inSassScriptDirective() — Returns a value indicating whether this node is in a SassScript directive
- interpolate() — Replace interpolated SassScript contained in '#{}' with the parsed value.
- isChildOf() — Returns a value indicating if this node is a child of the passed node.
- isa() — Returns a value indicating if the token represents this type of node.
- parseChildren() — Parse the children of the node.