class TokenStream
Represents a token stream.
Properties
| $current |
Methods
| __construct(array $tokens) Constructor. | ||
| 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. |
Details
__construct(array $tokens)
Constructor.
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.
Please login to continue.