[csswg-drafts] [css-syntax] problem with consume list of rules (#3631)

tabatkins has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-syntax] problem with consume list of rules ==
(migrated from mailing list)

**Johannes Koch said:**

> 5.4.1. Consume a list of rules
> 
> ...
> `<at-keyword-token>`
>      Reconsume the current input token. Consume an at-rule. If anything
>      is returned, append it to the list of rules.
> 
> [Then 5.4.2. Consume an at-rule]
> 
> Create a new at-rule with its name set to the value of the current input 
> token, its prelude initially set to an empty list, and its value 
> initially set to nothing.
> 
> Repeatedly consume the next input token:
> 
> [Because of 'Reconsume the current input token' in 5.4.1. the 
> `<at-keyword-token>` is still the current input token.]
> 
> ...
> anything else
>      Reconsume the current input token. Consume a component value.
>      Append the returned value to the at-rule’s prelude.
> 
> [The component value consumed is the `<at-keyword-token>` and is added to 
> the prelude.]
> 
> The same applies to 5.4.1
> anything else
> 
> also reconsuming the current input token before consuming a qualified rule.
> 
> I think the 'Reconsume the current input token' has to be removed.
> 
> 
> Additionally, I don't understand the case
> `<CDO-token>`
> `<CDC-token>`
> ...
> Otherwise, ...
> 
> input: <!--foo
> creates a prelude with 3 entries:
> 1. CDO
> 2. CDO
> 3. Ident foo

------------------

**Tab Atkins said:**

> > I think the 'Reconsume the current input token' has to be removed.
> 
> Fixed, but in a different way.
> 
> > input: <!--foo
> > creates a prelude with 3 entries:
> > 1. CDO
> > 2. CDO
> > 3. Ident foo
> 
> I don't understand why this would happen.  In any case, it certainly
> doesn't happen in the current spec, now that I've fixed the algos.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3631 using your GitHub account

Received on Thursday, 7 February 2019 23:40:18 UTC