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\SyntaxCode
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;
}