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

Breadcrumb

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

function TokenStream::getNextIdentifierOrStar

Returns next identifier or null if star delimiter token is found.

Throws

SyntaxErrorException If next token is not an identifier or a star delimiter

File

vendor/symfony/css-selector/Parser/TokenStream.php, line 130

Class

TokenStream
CSS selector token stream.

Namespace

Symfony\Component\CssSelector\Parser

Code

public function getNextIdentifierOrStar() : ?string {
    $next = $this->getNext();
    if ($next->isIdentifier()) {
        return $next->getValue();
    }
    if ($next->isDelimiter([
        '*',
    ])) {
        return null;
    }
    throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next);
}

API Navigation

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