private function staticScalar() {
    if ($this->currentType === T_ARRAY) {
      $node = new ArrayNode();
      $this->mustMatch(T_ARRAY, $node);
      $this->mustMatch('(', $node, 'openParen');
      $this->staticArrayPairList($node, ')');
      $this->mustMatch(')', $node, 'closeParen', TRUE);
      return $node;
    }
    elseif ($this->currentType === '[') {
      $node = new ArrayNode();
      $this->mustMatch('[', $node);
      $this->staticArrayPairList($node, ']');
      $this->mustMatch(']', $node, NULL, TRUE);
      return $node;
    }
    else {
      return $this->expr(TRUE);
    }
  }
private function staticScalar() {
    if ($this->currentType === T_ARRAY) {
      $node = new ArrayNode();
      $this->mustMatch(T_ARRAY, $node);
      $this->mustMatch('(', $node, 'openParen');
      $this->staticArrayPairList($node, ')');
      $this->mustMatch(')', $node, 'closeParen', TRUE);
      return $node;
    }
    elseif ($this->currentType === '[') {
      $node = new ArrayNode();
      $this->mustMatch('[', $node);
      $this->staticArrayPairList($node, ']');
      $this->mustMatch(']', $node, NULL, TRUE);
      return $node;
    }
    else {
      return $this->expr(TRUE);
    }
  }
private function staticScalar ( ) { if ( $ this -> currentType === T_ARRAY ) { $ node = new ArrayNode ( ) ; $ this -> mustMatch ( T_ARRAY , $ node ) ; $ this -> mustMatch ( '(' , $ node , 'openParen' ) ; $ this -> staticArrayPairList ( $ node , ')' ) ; $ this -> mustMatch ( ')' , $ node , 'closeParen' , TRUE ) ; return $ node ; } elseif ( $ this -> currentType === '[' ) { $ node = new ArrayNode ( ) ; $ this -> mustMatch ( '[' , $ node ) ; $ this -> staticArrayPairList ( $ node , ']' ) ; $ this -> mustMatch ( ']' , $ node , NULL , TRUE ) ; return $ node ; } else { return $ this -> expr ( TRUE ) ; } }
Parse a static scalar expression.
@return Node
@throws ParserException
Parse a static scalar expression .