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

Breadcrumb

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

function Parser::parseRestProperty

Parses a rest property

Return value

Node\RestElement|null

1 call to Parser::parseRestProperty()
Parser::parseObjectBindingPattern in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses an object binding pattern

File

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

Class

Parser
Parser class

Namespace

Peast\Syntax

Code

protected function parseRestProperty() {
    $state = $this->scanner
        ->getState();
    if ($token = $this->scanner
        ->consume("...")) {
        if ($argument = $this->parseIdentifier(static::$bindingIdentifier)) {
            $node = $this->createNode("RestElement", $token);
            $node->setArgument($argument);
            return $this->completeNode($node);
        }
        $this->scanner
            ->setState($state);
    }
    return null;
}

API Navigation

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