Moves to the next token in the input string.
A token is an associative array containing three items:
- 'value' : the string value of the token in the input string
- 'type' : the type of the token (identifier, numeric, string, input
parameter, none)
- 'position' : the position of the token in the input string
Return value
array|null the next token; null if there is no more tokens left
File
- drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php, line 135
Class
- Lexer
- Base class for writing simple lexers, i.e. for creating small DSLs.
Namespace
Doctrine\Common
Code
public function moveNext() {
$this->peek = 0;
$this->token = $this->lookahead;
$this->lookahead = isset($this->tokens[$this->position]) ? $this->tokens[$this->position++] : null;
return $this->lookahead !== null;
}