htl-spec icon indicating copy to clipboard operation
htl-spec copied to clipboard

Allow trailing commas in optionaValues literal

Open paul-bjorkstrand opened this issue 3 years ago • 0 comments

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

paul-bjorkstrand avatar Sep 11 '20 16:09 paul-bjorkstrand