class TokenStream
Represents a token stream.
$current |
__construct(array $tokens, string $expression = '') | ||
string | __toString() Returns a string representation of the token stream. | |
next() Sets the pointer to the next token and returns the old one. | ||
expect(array|int $type, string|null $value = null, string|null $message = null) Tests a token. | ||
bool | isEOF() Checks if end of stream was reached. | |
string | getExpression() |
array | $tokens | |
string | $expression |
Returns a string representation of the token stream.
string |
Sets the pointer to the next token and returns the old one.
Tests a token.
array|int | $type | The type to test |
string|null | $value | The token value |
string|null | $message | The syntax error message |
Checks if end of stream was reached.
bool |
string |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/ExpressionLanguage/TokenStream.html