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

Breadcrumb

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

function Parser::parsePrivateIdentifier

Parses a private identifier

Return value

Node\PrivateIdentifier|null

3 calls to Parser::parsePrivateIdentifier()
Parser::parseClassElementName in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses a property name. The returned value is an array where there first element is the property name and the second element is a boolean indicating if it's a computed property
Parser::parseLeftHandSideExpression in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses a left hand side expression
Parser::parseLogicalBinaryExpression in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses a logical or a binary expression

File

vendor/mck89/peast/lib/Peast/Syntax/Parser.php, line 3731

Class

Parser
Parser class

Namespace

Peast\Syntax

Code

protected function parsePrivateIdentifier() {
    $token = $this->scanner
        ->getToken();
    if (!$token || $token->type !== Token::TYPE_PRIVATE_IDENTIFIER) {
        return null;
    }
    $this->scanner
        ->consumeToken();
    $node = $this->createNode("PrivateIdentifier", $token);
    $node->setName(substr($token->value, 1));
    return $this->completeNode($node);
}

API Navigation

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