private function expr($static = FALSE) {
    static $end_expression_types = [':', ';', ',', ')', ']', '}', T_AS, T_DOUBLE_ARROW, T_CLOSE_TAG];
    // Group tokens into operands & operators to pass to the expression parser
    $expression_nodes = [];
    while ($this->currentType !== NULL && !in_array($this->currentType, $end_expression_types)) {
      if ($op = $this->exprOperator($static)) {
        $expression_nodes[] = $op;
        if ($op->type === T_INSTANCEOF) {
          $expression_nodes[] = $this->classNameReference();
        }
      }
      elseif ($operand = ($static ? $this->staticOperand() : $this->exprOperand())) {
        $expression_nodes[] = $operand;
      }
      else {
        throw new ParserException(
          $this->filename,
          $this->iterator->getLineNumber(),
          $this->iterator->getColumnNumber(),
          "invalid expression");
      }
    }
    return $this->expressionParser->parse($expression_nodes, $this->filename);
  }
private function expr($static = FALSE) {
    static $end_expression_types = [':', ';', ',', ')', ']', '}', T_AS, T_DOUBLE_ARROW, T_CLOSE_TAG];
    // Group tokens into operands & operators to pass to the expression parser
    $expression_nodes = [];
    while ($this->currentType !== NULL && !in_array($this->currentType, $end_expression_types)) {
      if ($op = $this->exprOperator($static)) {
        $expression_nodes[] = $op;
        if ($op->type === T_INSTANCEOF) {
          $expression_nodes[] = $this->classNameReference();
        }
      }
      elseif ($operand = ($static ? $this->staticOperand() : $this->exprOperand())) {
        $expression_nodes[] = $operand;
      }
      else {
        throw new ParserException(
          $this->filename,
          $this->iterator->getLineNumber(),
          $this->iterator->getColumnNumber(),
          "invalid expression");
      }
    }
    return $this->expressionParser->parse($expression_nodes, $this->filename);
  }
private function expr ( $ static = FALSE ) { static $ end_expression_types = [ ':' , ';' , ',' , ')' , ']' , '}' , T_AS , T_DOUBLE_ARROW , T_CLOSE_TAG ] ; // Group tokens into operands & operators to pass to the expression parser $ expression_nodes = [ ] ; while ( $ this -> currentType !== NULL && ! in_array ( $ this -> currentType , $ end_expression_types ) ) { if ( $ op = $ this -> exprOperator ( $ static ) ) { $ expression_nodes [ ] = $ op ; if ( $ op -> type === T_INSTANCEOF ) { $ expression_nodes [ ] = $ this -> classNameReference ( ) ; } } elseif ( $ operand = ( $ static ? $ this -> staticOperand ( ) : $ this -> exprOperand ( ) ) ) { $ expression_nodes [ ] = $ operand ; } else { throw new ParserException ( $ this -> filename , $ this -> iterator -> getLineNumber ( ) , $ this -> iterator -> getColumnNumber ( ) , "invalid expression" ) ; } } return $ this -> expressionParser -> parse ( $ expression_nodes , $ this -> filename ) ; }
Parse an expression.
@param bool $static TRUE if static expression
@return Node
@throws ParserException
Parse an expression .