nl_tokens: Reads a list of constants declaration ebnf const_list :: = T_CONST T_STRING = expr ( T_STRING = expr ) * ;
pl_tokens: 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 <mask> ( constName , null ) ; } } , "," , false ) ; }