PHP Class SassScriptLexer
Lexes SassSCript into tokens for the parser.
Implements a {@link http://en.wikipedia.org/wiki/Shunting-yard_algorithm Shunting-yard algorithm} to provide {@link http://en.wikipedia.org/wiki/Reverse_Polish_notation Reverse Polish notation} output.
Datei anzeigen
Open project: richthegeek/phpsass
Class Usage Examples
Public Properties
Property |
Type |
Description |
|
$instance |
|
Static holder for last instance of SassScriptLexer |
|
$parser |
|
the parser object |
|
Public Methods
Method |
Description |
|
__construct ( $parser ) : SassScriptLexer |
SassScriptLexer constructor. |
|
isWhitespace ( string $subject ) : mixed |
Returns a value indicating if a token of this type can be matched at
the start of the subject string. |
|
lex ( string $string, SassContext $context ) : array |
Lex an expression into SassScript tokens. |
|
Method Details
__construct()
public method
SassScriptLexer constructor.
public __construct ( $parser ) : SassScriptLexer |
return |
SassScriptLexer |
|
isWhitespace()
public method
Returns a value indicating if a token of this type can be matched at
the start of the subject string.
Lex an expression into SassScript tokens.
public lex ( string $string, SassContext $context ) : array |
$string |
string |
expression to lex |
$context |
SassContext |
the context in which the expression is lexed |
return |
array |
tokens |
Property Details
$instance public_oe static_oe property
Static holder for last instance of SassScriptLexer
$parser public_oe property