You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tokenization defines the type flag on three tokens -- <number-token>, <percentage-token> and <dimension-token>, and assigns it a default value of "integer".
Consume a numeric token specifically sets the type flag on <number-token>s and <dimension-token>s to the one in the number returned from Consume a number, using the wording
create a <xxx-token> with the same value and type flag as number
However, this type flag isn't assigned for <percentage-token>s, as that just says
create a <percentage-token> with the same value as number, and return it.
A strict reading of the spec suggests that therefore, a <percentage-token> always has a type of "integer", even if it's value is, for instance, 50.90, which seems wrong.
The text was updated successfully, but these errors were encountered:
I don't think it was a mistake, because the type flag is not defined for <percentage-token>.
The spec states in section 4:
<number-token>, <percentage-token>, and <dimension-token> have a numeric value. <number-token> and <dimension-token>additionally have a type flag set to either "integer" or "number". The type flag defaults to "integer" if not otherwise set. <dimension-token> additionally have a unit composed of one or more code points.
(and there is no such kind of things defined for <percentage-token> anywhere else.)
Ah, you're right! Dang it, I thought it was weird I had such an obvious error! Okay, I'll revert, but put a note into the source to remind myself in the future.
Tokenization defines the
type
flag on three tokens --<number-token>
,<percentage-token>
and<dimension-token>
, and assigns it a default value of "integer".Consume a numeric token specifically sets the
type
flag on<number-token>
s and<dimension-token>
s to the one in thenumber
returned from Consume a number, using the wordingHowever, this
type
flag isn't assigned for<percentage-token>
s, as that just saysA strict reading of the spec suggests that therefore, a
<percentage-token>
always has atype
of "integer", even if it'svalue
is, for instance,50.90
, which seems wrong.The text was updated successfully, but these errors were encountered: