- Notifications
You must be signed in to change notification settings - Fork 749
Open
Labels
Description
Parse a declaration is intended for parsing @supports
conditions. It invokes consume a declaration, which stops consuming the value when it finds ;
:
- Consume a list of component values from
input
, withnested
, and with<semicolon-token>
as the stop token, and setdecl
’s value to the result.
A CSS parser would fail to match color: green;
against <declaration>
because the input is not fully consumed. But (color: green;)
would then match <general-enclosed>
.
Should it return a syntax error when the next token is not <EOF-token>
instead, like parse a rule, for consistency?
- If the next token from
input
is an<EOF-token>
, returnrule
. Otherwise, return a syntax error.