Re: [csswg-drafts] [css-syntax-3] Potentially missing a "parse error" specifier in "consume a URL token"? (#7987)

(Generalizing this issue to all occurrence of "parse errors".)

Another case is [*consume a qualified rule*](https://drafts.csswg.org/css-syntax-3/#consume-qualified-rule), which mentions `}` as a parse error, whereas [*consume an at-rule*](https://drafts.csswg.org/css-syntax-3/#consume-at-rule) does not.

Explicitly mentioning (and processing) these "bad and orphan" tokens as parse errors in all the algorithms would make them unnecessarily complex imo. Conversely, being consistently implicit might be even more confusing:

  > - U+0022 QUOTATION MARK (")
  > - U+0027 APOSTROPHE (')
  > - non-printable code point
  >   This is a parse error. Consume the remnants of a bad url, create a `<bad-url-token>`, and return it.
  > - U+0028 LEFT PARENTHESIS (()
  >   Consume the remnants of a bad url, create a `<bad-url-token>`, and return it.

Being explicit only when necessary therefore seems to be a good compromise.

-- 
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7987#issuecomment-2498236542 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 25 November 2024 14:52:03 UTC