/** * This method parses a declare-statement. * * <code> * ------------------------------- * declare(encoding='ISO-8859-1'); * ------------------------------- * * ------------------- * declare(ticks=42) { * // ... * } * - * * ------------------ * declare(ticks=42): * // ... * enddeclare; * ----------- * </code> * * @return PHP_Depend_Code_ASTDeclareStatement * @since 0.10.0 */ private function parseDeclareStatement() { $this->tokenStack->push(); $this->consumeToken(self::T_DECLARE); $stmt = $this->builder->buildAstDeclareStatement(); $stmt = $this->parseDeclareList($stmt); $stmt = $this->parseStatementBody($stmt); return $this->setNodePositionsAndReturn($stmt); }