Пример #1
0
 /**
  * Parses the init part of a for-statement.
  *
  * <code>
  *      ------------------------
  * for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x) {}
  *      ------------------------
  * </code>
  *
  * @return PHP_Depend_Code_ASTForInit
  * @since 0.9.8
  */
 private function parseForInit()
 {
     $this->consumeComments();
     if (self::T_SEMICOLON === $this->tokenizer->peek()) {
         return null;
     }
     $this->tokenStack->push();
     $init = $this->builder->buildAstForInit();
     $this->parseExpressionList($init);
     return $this->setNodePositionsAndReturn($init);
 }