src/parser/statement.js
function() {
    const result = [];
    while (this.token != this.EOF && this.token !== ")") {
      this.expect(this.tok.T_STRING);
      const directive = this.node("declaredirective");
      let key = this.node("identifier");
      const name = this.text();
      this.next();
      key = key(name);
      let value = null;
      if (this.expect("=")) {
        value = this.next().read_expr();
      }
      result.push(directive(key, value));
      if (this.token !== ",") break;
      this.next();
    }
    return result;
  }
function() {
    const result = [];
    while (this.token != this.EOF && this.token !== ")") {
      this.expect(this.tok.T_STRING);
      const directive = this.node("declaredirective");
      let key = this.node("identifier");
      const name = this.text();
      this.next();
      key = key(name);
      let value = null;
      if (this.expect("=")) {
        value = this.next().read_expr();
      }
      result.push(directive(key, value));
      if (this.token !== ",") break;
      this.next();
    }
    return result;
  }
function ( ) { const result = [ ] ; while ( this . token != this . EOF && this . token !== ")" ) { this . expect ( this . tok . T_STRING ) ; const directive = this . node ( "declaredirective" ) ; let key = this . node ( "identifier" ) ; const name = this . text ( ) ; this . next ( ) ; key = key ( name ) ; let value = null ; if ( this . expect ( "=" ) ) { value = this . next ( ) . read_expr ( ) ; } result . push ( directive ( key , value ) ) ; if ( this . token !== "," ) break ; this . next ( ) ; } return result ; }
Reads a list of constants declaration
```ebnf
declare_list ::= IDENTIFIER '=' expr (',' IDENTIFIER '=' expr)*
```
@retrurn {Array}
Reads a list of constants declaration ebnf declare_list :: = IDENTIFIER = expr ( IDENTIFIER = expr ) *