function Parser::parseClassBody
Parses the class body
Return value
Node\ClassBody|null
1 call to Parser::parseClassBody()
- Parser::parseClassTail in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses the code that comes after the class keyword and class name. The return value is an array where the first item is the extended class, if any, and the second value is the class body
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php, line 1756
Class
- Parser
- Parser class
Namespace
Peast\SyntaxCode
protected function parseClassBody() {
$body = $this->parseClassElementList();
$node = $this->createNode("ClassBody", $body ?: $this->scanner
->getPosition());
if ($body) {
$node->setBody($body);
}
return $this->completeNode($node);
}