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

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