예제 #1
0
 /**
  * This method parses a do/while-statement.
  *
  * @return PHP_Depend_Code_ASTDoWhileStatement
  * @sibce 0.9.12
  */
 private function parseDoWhileStatement()
 {
     $this->tokenStack->push();
     $token = $this->consumeToken(self::T_DO);
     $stmt = $this->builder->buildAstDoWhileStatement($token->image);
     $stmt = $this->parseStatementBody($stmt);
     $this->consumeComments();
     $this->consumeToken(self::T_WHILE);
     $stmt->addChild($this->parseParenthesisExpression());
     $this->parseStatementTermination();
     return $this->setNodePositionsAndReturn($stmt);
 }