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

parseCatchStatement() private method

This method parses a catch-statement.
Since: 0.9.8
private parseCatchStatement ( ) : PDepend\Source\AST\ASTCatchStatement
return PDepend\Source\AST\ASTCatchStatement
    private function parseCatchStatement()
    {
        $this->tokenStack->push();
        $this->consumeComments();
        $token = $this->consumeToken(Tokens::T_CATCH);
        $catch = $this->builder->buildAstCatchStatement($token->image);
        $this->consumeComments();
        $this->consumeToken(Tokens::T_PARENTHESIS_OPEN);
        $catch->addChild($this->builder->buildAstClassOrInterfaceReference($this->parseQualifiedName()));
        $this->consumeComments();
        $catch->addChild($this->parseVariable());
        $this->consumeComments();
        $this->consumeToken(Tokens::T_PARENTHESIS_CLOSE);
        $catch->addChild($this->parseRegularScope());
        return $this->setNodePositionsAndReturn($catch);
    }
AbstractPHPParser