W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-syntax] Possible error in 4.3.4: Consume an ident-like token.

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 25 Jul 2014 11:02:42 -0700
Message-ID: <CAAWBYDDaFsKEXi8kBC_PrenUFr7x2KE3T4kT+Mt4AVW2A-Ka7Q@mail.gmail.com>
To: Ezequiel Rodriguez <ezequiel@yahoo.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Jul 25, 2014 at 4:35 AM, Ezequiel Rodriguez <ezequiel@yahoo.com> wrote:
> Context: http://dev.w3.org/csswg/css-syntax/#consume-an-ident-like-token
> In the third paragraph, it states:
>     ... If the next input token is U+0022 QUOTATION MARK (") or U+0027
>     reconsume the current input code point, then create a <function-token>
> with its value set to the returned string and return it.
> At the point in time the above statement is executed, the current input code
> point is U+0028 LEFT PARENTHESIS ((). If we reconsume the current input code
> point, as instructed, the next token in the stream would then be a
> <delim-token> with the value of U+0028 LEFT PARENTHESIS (().
> Is this the desired behavior? It doesn't seem so, as we always consume the
> U+0028 LEFT PARENTHESIS (() code point if it is seen-- as described in two
> other places of "Consume an ident-like token."
> In conclusion, I believe the "reconsume the current input code point"
> portion can safely be removed.

There is a mistake there, but not the one you noticed. ^_^

The reconsume line there is intentional - if there's any whitespace
between the ( and ", I want to eventually emit a whitespace token.
Since the algo consumes all of that, though, I have to reconsume so
that the next call to consumeAToken correctly sees a whitespace

The bug is that if there's no whitespace, then I end up reconsuming
the ( code point, which I don't want to do.

Good catch, and fixed.

Received on Friday, 25 July 2014 18:03:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC