function Scanner::getNextToken
Returns the next token
Return value
Token|null
3 calls to Scanner::getNextToken()
- Scanner::getState in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php - Returns the current scanner state
- Scanner::isBefore in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php - Checks if one of the given strings follows the current scan position
- Scanner::noLineTerminators in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php - Checks that there are not line terminators following the current scan position before next token
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Scanner.php, line 795
Class
- Scanner
- Base class for scanners.
Namespace
Peast\SyntaxCode
public function getNextToken() {
if (!$this->nextToken) {
$token = $this->currentToken ?: $this->getToken();
$this->currentToken = null;
$this->nextToken = $this->getToken(true);
$this->currentToken = $token;
}
return $this->nextToken;
}