htl-spec
htl-spec copied to clipboard
Allow trailing commas in optionaValues literal
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