Свойство | Type | Description | |
---|---|---|---|
$context | Used for error reporting | ||
$instance | Hold a copy of a parser available to the general public. | ||
$lexer | the lexer object |
Méthode | Description | |
---|---|---|
__construct ( ) : SassScriptParser | SassScriptParser constructor. | |
evaluate ( string $expression, SassContext $context, integer $environment = self::DEFAULT_ENV ) : SassLiteral | Evaluate a SassScript. | |
interpolate ( string $string, SassContext $context ) : string | Replace interpolated SassScript contained in '#{}' with the parsed value. | |
makeSingular ( $operands ) | Reduces a set down to a singular form | |
parse ( string $expression, SassContext $context, integer $environment = self::DEFAULT_ENV ) : array | Parse SassScript to a set of tokens in RPN using the Shunting Yard Algorithm. |
public __construct ( ) : SassScriptParser | ||
Résultat | SassScriptParser |
public evaluate ( string $expression, SassContext $context, integer $environment = self::DEFAULT_ENV ) : SassLiteral | ||
$expression | string | expression to parse |
$context | SassContext | the context in which the expression is evaluated |
$environment | integer | the environment in which the expression is evaluated |
Résultat | SassLiteral | parsed value |
public interpolate ( string $string, SassContext $context ) : string | ||
$string | string | the text to interpolate |
$context | SassContext | the context in which the string is interpolated |
Résultat | string | the interpolated text |
public static makeSingular ( $operands ) |
public parse ( string $expression, SassContext $context, integer $environment = self::DEFAULT_ENV ) : array | ||
$expression | string | expression to parse |
$context | SassContext | the context in which the expression is parsed |
$environment | integer | the environment in which the expression is parsed |
Résultat | array | tokens in RPN |
public static $instance |