예제 #1
0
파일: Parser.php 프로젝트: rouffj/pdepend
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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);
 }