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, with nested, and with <semicolon-token> as the stop token, and set decl’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>, return rule. Otherwise, return a syntax error.