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

Breadcrumb

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

function NodeAbstract::getEndTokenPos

Gets the token offset of the last token that is part of this node.

The offset is an index into the array returned by Lexer::getTokens().

Requires the 'endTokenPos' attribute to be enabled in the lexer (DISABLED by default).

Return value

int Token end position (or -1 if not available)

Overrides Node::getEndTokenPos

File

vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php, line 74

Class

NodeAbstract

Namespace

PhpParser

Code

public function getEndTokenPos() : int {
    return $this->attributes['endTokenPos'] ?? -1;
}

API Navigation

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