function() {
    return this.read_list(
      function() {
        this.expect(this.tok.T_STRING);
        const result = this.node("constant");
        let constName = this.node("identifier");
        const name = this.text();
        this.next();
        constName = constName(name);
        if (this.expect("=")) {
          return result(constName, this.next().read_expr());
        } else {
          // fallback
          return result(constName, null);
        }
      },
      ",",
      false
    );
  }
function() {
    return this.read_list(
      function() {
        this.expect(this.tok.T_STRING);
        const result = this.node("constant");
        let constName = this.node("identifier");
        const name = this.text();
        this.next();
        constName = constName(name);
        if (this.expect("=")) {
          return result(constName, this.next().read_expr());
        } else {
          
          return result(constName, null);
        }
      },
      ",",
      false
    );
  }
function ( ) { return this . read_list ( function ( ) { this . expect ( this . tok . T_STRING ) ; const result = this . node ( "constant" ) ; let constName = this . node ( "identifier" ) ; const name = this . text ( ) ; this . next ( ) ; constName = constName ( name ) ; if ( this . expect ( "=" ) ) { return result ( constName , this . next ( ) . read_expr ( ) ) ; } else { // fallback return result ( constName , null ) ; } } , "," , false ) ; }
Reads a list of constants declaration
```ebnf
const_list ::= T_CONST T_STRING '=' expr (',' T_STRING '=' expr)* ';'
```
Reads a list of constants declaration ebnf const_list :: = T_CONST T_STRING = expr ( T_STRING = expr ) * ;