/** * This method parses a single elseif-statement node. * * @return PHP_Depend_Code_ASTElseIfStatement * @since 0.9.8 */ private function parseElseIfStatement() { $this->tokenStack->push(); $token = $this->consumeToken(self::T_ELSEIF); $stmt = $this->builder->buildAstElseIfStatement($token->image); $stmt->addChild($this->parseParenthesisExpression()); $this->parseStatementBody($stmt); $this->parseOptionalElseOrElseIfStatement($stmt); return $this->setNodePositionsAndReturn($stmt); }