Re: Selector parsing: It's easy to hit unexpected unicode-range tokens

On 6/30/14, 11:12 AM, Simon Sapin wrote:
> On 30/06/14 15:34, Boris Zbarsky wrote:
>> It seems to me like either we should not have a separate unicode-range
>> token and instead handle unicode ranges on the parser level or we should
>> have some sort of special token reprocessing logic in the selector
>> parser.  My preference is very much for the former.
>
> I think we can do the former with a definition similar to this
> definition of <An+B> (the argument to :nth-child())
>
> http://dev.w3.org/csswg/css-syntax/#the-anb-type
>
> It’s ugly, but it’s well-defined and it seems to be the "least worst" we
> can do here.

I guess there is a third option too: tokenizer modes, such that u+a 
would be tokenized differently in different contexts.  I'm not sure how 
happy we are with that idea.

-Boris

Received on Monday, 30 June 2014 16:24:21 UTC