Description
https://drafts.csswg.org/css-values/#mult-comma introduces for grammars a #
repetition which is like *
but with comma separators. Terse grammars are nice, but in this case in this case this important difference seems easy to miss.
A couple times now I’ve reviewed a pull request from someone (not necessarily a new contributor) implementing CSS parsing from grammar in a spec like https://drafts.csswg.org/css-shapes-1/#funcdef-polygon . They do write a loop but don’t seem to realize that commas are required.
(Servo’s doesn’t use a parser generator for CSS. It’s manually-written recursive descent with one function or method for roughly each grammar term.)
In some specs (not css-shapes, which may be a bug) the #
itself is a link to its definition in css-values, but even that is easy to miss.
I don’t know what to do about this, but it seems to be a recurring issue.
CC @tabatkins