/** * This method parses a echo-statement node. * * @return PHP_Depend_Code_ASTEchoStatement * @since 0.9.12 */ private function _parseEchoStatement() { $this->_tokenStack->push(); $token = $this->consumeToken(self::T_ECHO); $stmt = $this->_parseExpressionList($this->builder->buildASTEchoStatement($token->image)); $this->_parseStatementTermination(); return $this->_setNodePositionsAndReturn($stmt); }
/** * This method parses a echo-statement node. * * @return PHP_Depend_Code_ASTEchoStatement * @since 0.9.12 */ private function _parseEchoStatement() { $this->_tokenStack->push(); $token = $this->_consumeToken(self::T_ECHO); $stmt = $this->_builder->buildASTEchoStatement($token->image); // TODO: $stmt->addChild($this->_parseExpression()) if (($expr = $this->_parseOptionalExpression()) != null) { $stmt->addChild($expr); } $this->_parseStatementTermination(); return $this->_setNodePositionsAndReturn($stmt); }