public function Lexer::glimpse

Peeks at the next token, returns it and immediately resets the peek.

Return value

array|null The next token or NULL if there are no more tokens ahead.

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php, line 188

Class

Lexer
Base class for writing simple lexers, i.e. for creating small DSLs.

Namespace

Doctrine\Common

Code

public function glimpse() {
  $peek = $this
    ->peek();
  $this->peek = 0;
  return $peek;
}