Lines Matching refs:Token
24 public const DEFAULT_TOKEN_CHANNEL = Token::DEFAULT_CHANNEL;
25 public const HIDDEN = Token::HIDDEN_CHANNEL;
48 * @var Token|null
88 public $channel = Token::DEFAULT_CHANNEL;
95 public $type = Token::INVALID_TYPE;
134 $this->type = Token::INVALID_TYPE;
135 $this->channel = Token::DEFAULT_CHANNEL;
153 public function nextToken() : ?Token
176 $this->channel = Token::DEFAULT_CHANNEL;
184 $this->type = Token::INVALID_TYPE;
193 if ($this->input->LA(1) === Token::EOF) {
197 if ($this->type === Token::INVALID_TYPE) {
310 public function emitToken(Token $token) : void
320 * custom Token objects or provide a new factory.
322 public function emit() : Token
340 public function emitEOF() : Token
350 Token::EOF,
352 Token::DEFAULT_CHANNEL,
436 public function getToken() : ?Token
444 public function setToken(Token $token) : void
486 * Return a list of all Token objects in input char stream.
489 * @return array<Token>
496 while ($token && $token->getType() !== Token::EOF) {
512 if ($this->input !== null && $this->input->LA(1) !== Token::EOF) {