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

Breadcrumb

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

function AbstractLexer::isNextTokenAny

Checks whether any of the given tokens matches the current lookahead.

@psalm-assert-if-true !=null $this->lookahead

Parameters

list<T> $types:

Return value

bool

File

vendor/doctrine/lexer/src/AbstractLexer.php, line 166

Class

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

Namespace

Doctrine\Common\Lexer

Code

public function isNextTokenAny(array $types) {
    return $this->lookahead !== null && $this->lookahead
        ->isA(...$types);
}

API Navigation

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