You are here

public function TokenStream::getNext in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/Parser/TokenStream.php \Symfony\Component\CssSelector\Parser\TokenStream::getNext()

Returns next token.

Return value

Token

Throws

InternalErrorException If there is no more token

4 calls to TokenStream::getNext()
TokenStream::getNextIdentifier in vendor/symfony/css-selector/Parser/TokenStream.php
Returns nex identifier token.
TokenStream::getNextIdentifierOrStar in vendor/symfony/css-selector/Parser/TokenStream.php
Returns nex identifier or star delimiter token.
TokenStream::getPeek in vendor/symfony/css-selector/Parser/TokenStream.php
Returns peeked token.
TokenStream::skipWhitespace in vendor/symfony/css-selector/Parser/TokenStream.php
Skips next whitespace if any.

File

vendor/symfony/css-selector/Parser/TokenStream.php, line 90

Class

TokenStream
CSS selector token stream.

Namespace

Symfony\Component\CssSelector\Parser

Code

public function getNext() {
  if ($this->peeking) {
    $this->peeking = false;
    $this->used[] = $this->peeked;
    return $this->peeked;
  }
  if (!isset($this->tokens[$this->cursor])) {
    throw new InternalErrorException('Unexpected token stream end.');
  }
  return $this->tokens[$this->cursor++];
}