Beispiel #1
0
 /**
  * This method parses an exit-expression.
  *
  * @return PHP_Depend_Code_ASTExitExpression
  * @since 0.9.12
  */
 private function parseExitExpression()
 {
     $this->tokenStack->push();
     $token = $this->consumeToken(self::T_EXIT);
     $expr = $this->builder->buildAstExitExpression($token->image);
     $this->consumeComments();
     if ($this->tokenizer->peek() === self::T_PARENTHESIS_OPEN) {
         $expr->addChild($this->parseParenthesisExpression());
     }
     return $this->setNodePositionsAndReturn($expr);
 }