function Parser::parseClassTail
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
Return value
array|null
2 calls to Parser::parseClassTail()
- Parser::parseClassDeclaration in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses a class declaration
- Parser::parseClassExpression in vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php - Parses a class expression
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Parser.php, line 1718
Class
- Parser
- Parser class
Namespace
Peast\SyntaxCode
protected function parseClassTail() {
$heritage = $this->parseClassHeritage();
if ($token = $this->scanner
->consume("{")) {
$body = $this->parseClassBody();
if ($this->scanner
->consume("}")) {
$body->location->start = $token->location->start;
$body->location->end = $this->scanner
->getPosition();
return array(
$heritage,
$body,
);
}
}
$this->error();
}