function DocLexer::nextTokenIsAdjacent

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Annotation/Doctrine/DocLexer.php \Drupal\Component\Annotation\Doctrine\DocLexer::nextTokenIsAdjacent()

Whether the next token starts immediately, or if there were non-captured symbols before that

File

core/lib/Drupal/Component/Annotation/Doctrine/DocLexer.php, line 92

Class

DocLexer
Simple lexer for docblock annotations.

Namespace

Drupal\Component\Annotation\Doctrine

Code

public function nextTokenIsAdjacent() : bool {
  return $this->token === null || $this->lookahead !== null && $this->lookahead->position - $this->token->position === strlen($this->token->value);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.