src/parser/variable.js
function(what, encapsed) {
    const result = this.node("staticlookup");
    let offset, name;
    if (this.next().is([this.tok.T_VARIABLE, "$"])) {
      offset = this.read_reference_variable(encapsed, false);
    } else if (
      this.token === this.tok.T_STRING ||
      this.token === this.tok.T_CLASS ||
      (this.php7 && this.is("IDENTIFIER"))
    ) {
      offset = this.node("identifier");
      name = this.text();
      this.next();
      offset = offset(name);
    } else if (this.token === "{") {
      offset = this.node("literal");
      name = this.next().read_expr();
      this.expect("}") && this.next();
      offset = offset("literal", name, null);
      this.expect("(");
    } else {
      this.error([this.tok.T_VARIABLE, this.tok.T_STRING]);
      // graceful mode : set getter as error node and continue
      offset = this.node("identifier");
      name = this.text();
      this.next();
      offset = offset(name);
    }
    return result(what, offset);
  }
function(what, encapsed) {
    const result = this.node("staticlookup");
    let offset, name;
    if (this.next().is([this.tok.T_VARIABLE, "$"])) {
      offset = this.read_reference_variable(encapsed, false);
    } else if (
      this.token === this.tok.T_STRING ||
      this.token === this.tok.T_CLASS ||
      (this.php7 && this.is("IDENTIFIER"))
    ) {
      offset = this.node("identifier");
      name = this.text();
      this.next();
      offset = offset(name);
    } else if (this.token === "{") {
      offset = this.node("literal");
      name = this.next().read_expr();
      this.expect("}") && this.next();
      offset = offset("literal", name, null);
      this.expect("(");
    } else {
      this.error([this.tok.T_VARIABLE, this.tok.T_STRING]);
      // graceful mode : set getter as error node and continue
      offset = this.node("identifier");
      name = this.text();
      this.next();
      offset = offset(name);
    }
    return result(what, offset);
  }
function ( what , encapsed ) { const result = this . node ( "staticlookup" ) ; let offset , name ; if ( this . next ( ) . is ( [ this . tok . T_VARIABLE , "$" ] ) ) { offset = this . read_reference_variable ( encapsed , false ) ; } else if ( this . token === this . tok . T_STRING || this . token === this . tok . T_CLASS || ( this . php7 && this . is ( "IDENTIFIER" ) ) ) { offset = this . node ( "identifier" ) ; name = this . text ( ) ; this . next ( ) ; offset = offset ( name ) ; } else if ( this . token === "{" ) { offset = this . node ( "literal" ) ; name = this . next ( ) . read_expr ( ) ; this . expect ( "}" ) && this . next ( ) ; offset = offset ( "literal" , name , null ) ; this . expect ( "(" ) ; } else { this . error ( [ this . tok . T_VARIABLE , this . tok . T_STRING ] ) ; // graceful mode : set getter as error node and continue offset = this . node ( "identifier" ) ; name = this . text ( ) ; this . next ( ) ; offset = offset ( name ) ; } return result ( what , offset ) ; }
resolves a static call
resolves a static call