W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css3-syntax] Reviving the spec, starting with the parser

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 13 Apr 2012 08:17:12 -0700
Message-ID: <CAAWBYDBzWKq2qiyr2h00qhdfBrLD+PuTOYe1Wqq2OAUgmrR7Xg@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style list <www-style@w3.org>
On Fri, Apr 13, 2012 at 3:47 AM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Some properties accept <integer> values. For example: "2" is a valid
> integer, but "2.0" is not. However, both end up as NUMBER tokens with the
> same numeric value.
>
> How does the parser distinguish them? Do the NUMBER tokens have additional
> meta-data?
>
> Should we add an INTEGER token type instead? (This would mean that both
> token types would need to be checked wherever a <number> is accepted.)

Ooh, good point.

I think an extra token will be clutter, so I'll just add a flag to the
number token instead.

~TJ
Received on Friday, 13 April 2012 15:18:03 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:13 UTC