PDepend\Source\Language\PHP\AbstractPHPParser::parseStatementBody PHP Method

parseStatementBody() private method

Parses the body of the given statement instance and adds all parsed nodes to that statement.
Since: 0.9.12
private parseStatementBody ( PDepend\Source\AST\ASTStatement $stmt ) : PDepend\Source\AST\ASTStatement
$stmt PDepend\Source\AST\ASTStatement The owning statement.
return PDepend\Source\AST\ASTStatement
    private function parseStatementBody(\PDepend\Source\AST\ASTStatement $stmt)
    {
        $this->consumeComments();
        $tokenType = $this->tokenizer->peek();
        if ($tokenType === Tokens::T_CURLY_BRACE_OPEN) {
            $stmt->addChild($this->parseRegularScope());
        } elseif ($tokenType === Tokens::T_COLON) {
            $stmt->addChild($this->parseAlternativeScope());
        } else {
            $stmt->addChild($this->parseStatement());
        }
        return $stmt;
    }
AbstractPHPParser