Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Scanner.php

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\Syntax

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal