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

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