Re: [css-syntax] declaration error handling

Le 30/04/2013 14:14, Rune Lillesveen a écrit :
> In "5.5.4. Consume a list of declarations" of the current ED you have:
> "anything else:
>    This is a parse error. Repeatedly consume the next input token until it
> is a semicolon token or EOF token."
> Should this have been: "... Repeatedly consume a component value ..." in
> order to match blocks correctly?
> For instance:
>     * { # {; color: red; } }
> The hash ends up as "anything else". If you simply consume the next input
> tokens, it means the first semi-colon inside the inner block will be the
> end of the declaration, which is wrong.

Yes, this is correct.

By the way, to go further in the direction that the draft has taken 
lately and eliminate this kind of issue, I believe that "consume a 
primitive" could be entirely folded into the tokenizer (or moved to a 
new intermediate step) so that the parser works exclusively on component 
values rather than tokens. (This, of course, is only editorial and does 
not force any internal organization on implementations, even if it 
happens to be how tinycss works ;))

Simon Sapin

Received on Tuesday, 30 April 2013 12:28:27 UTC