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

Breadcrumb

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

function Parser::parseExportSpecifier

Parses an export specifier

Return value

Node\ExportSpecifier|null

1 call to Parser::parseExportSpecifier()
Parser::parseExportClause in vendor/mck89/peast/lib/Peast/Syntax/Parser.php
Parses an export clause

File

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

Class

Parser
Parser class

Namespace

Peast\Syntax

Code

protected function parseExportSpecifier() {
    if ($local = $this->parseModuleExportName()) {
        $node = $this->createNode("ExportSpecifier", $local);
        $node->setLocal($local);
        if ($this->scanner
            ->consume("as")) {
            if ($exported = $this->parseModuleExportName()) {
                $node->setExported($exported);
                return $this->completeNode($node);
            }
            $this->error();
        }
        else {
            $node->setExported($local);
            return $this->completeNode($node);
        }
    }
    return null;
}

API Navigation

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