function Parser::parseForBinding
Parses a binding pattern or an identifier that come after a const or let declaration in a for statement definition
Return value
Node\VariableDeclarator|null
2 calls to Parser::parseForBinding()
- Parser::parseForDeclaration in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses a let or const declaration in a for statement definition
- Parser::parseForVarStatement in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses a for(var ...) statement
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php, line 1964
Class
- Parser
- Parser class
Namespace
Peast\SyntaxCode
protected function parseForBinding() {
if (($id = $this->parseIdentifier(static::$bindingIdentifier)) || ($id = $this->parseBindingPattern())) {
$node = $this->createNode("VariableDeclarator", $id);
$node->setId($id);
return $this->completeNode($node);
}
return null;
}