function Parser::parseFromClause
Parses the from keyword and the following string in import and export declarations
Return value
Node\StringLiteral|null
2 calls to Parser::parseFromClause()
- Parser::parseExportDeclaration in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses an export declaration
- Parser::parseImportDeclaration in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses an import declaration
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php, line 2009
Class
- Parser
- Parser class
Namespace
Peast\SyntaxCode
protected function parseFromClause() {
if ($this->scanner
->consume("from")) {
if ($spec = $this->parseStringLiteral()) {
return $spec;
}
$this->error();
}
return null;
}