|
|
| __construct (private array $tokens, private ?Source $source=null,) |
|
| __toString () |
| | injectTokens (array $tokens) |
| | next () |
| | nextIf ($primary, $secondary=null) |
| | expect ($type, $value=null, ?string $message=null) |
| | look (int $number=1) |
| | test ($primary, $secondary=null) |
| | isEOF () |
|
| getCurrent () |
|
| getSourceContext () |
Represents a token stream.
- Auteur
- Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
◆ expect()
| expect |
( |
| $type, |
|
|
| $value = null, |
|
|
?string | $message = null ) |
Tests a token and returns it or throws a syntax error.
◆ injectTokens()
| injectTokens |
( |
array | $tokens | ) |
|
◆ isEOF()
Checks if end of stream was reached.
◆ look()
◆ next()
Sets the pointer to the next token and returns the old one.
◆ nextIf()
| nextIf |
( |
| $primary, |
|
|
| $secondary = null ) |
Tests a token, sets the pointer to the next one and returns it or throws a syntax error.
- Renvoie
- Token|null The next token if the condition is true, null otherwise
◆ test()
| test |
( |
| $primary, |
|
|
| $secondary = null ) |
La documentation de cette classe a été générée à partir du fichier suivant :
- vendor/twig/twig/src/TokenStream.php