W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css3-syntax] Preserved vs. non-preserved tokens.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 31 Jan 2013 22:30:46 -0800
Message-ID: <CAAWBYDBe4+Uo4m2CvQkgsq07wNNcWfE6_ESN9123n1pJoLSQ6g@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Jan 31, 2013 at 3:50 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 31/01/2013 22:28, Tab Atkins Jr. a écrit :
>> Never mind, I've made "consume a primitive" sometimes trigger a parse
>>
>> error and return nothing, and adjusted all the states to account for
>> that.  The bad tokens are ), ], }, cdo, cdc, bad-url, and bad-string.
>
> Now a non-preserved token in an at-rule prelude makes the whole at-rule
> invalid/ignored. Isn’t that incompatible with having any error recovery in
> preludes? For example I think that syntax errors in a comma-separated media
> query list makes one query invalid, with recovery at the next comma.
>
> Test case:
>
> data:text/html,<style>@media],screen{body{background:green

Hmm, you're right.  *However*, I'm not sure that it's so bad to fail
the entire rule due to egregrious syntax errors.  Our forward-compat
and error-handling is meant to let us extend things in the future, but
I think it's safe to assume that we won't ever add some new syntax
that employs an unbalanced ] token.

I doubt there's an interop problem with it, so if impls are okay with
the change, I think I'll keep it.

~TJ
Received on Friday, 1 February 2013 06:38:04 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:24 UTC