It would be nice to be able to leave trailing commas in a optionaValues literal format. I'm not sure the best way to change the grammar, but a possible idea could be:
optionValues = exprNode
| '[' , valueList [, ','] , ']' ;
This may have a conflict with valueList since it also contains commas, but I think it will work fine, since when in valueList all infix commas will be consumed, leaving just the trailing comma to be optionally consumed by optionValues
It would be nice to be able to leave trailing commas in a
optionaValuesliteral format. I'm not sure the best way to change the grammar, but a possible idea could be:This may have a conflict with
valueListsince it also contains commas, but I think it will work fine, since when invalueListall infix commas will be consumed, leaving just the trailing comma to be optionally consumed byoptionValues