Skip to content

Commit 782cf07

Browse files
committed
Fix order of Token wrt integer and float
With our interpretation of "first match wins" with alternation, this fixes a problem where INTEGER_LITERAL was incorrectly in front of FLOAT_LITERAL. Otherwise, an input of `1.2` would be interpreted as `INTEGER_LITERAL`, `PUNCTUATION`, `INTEGER_LITERAL` instead of `FLOAT_LITERAL`.
1 parent f10d6b1 commit 782cf07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Token ->
1414
| RAW_BYTE_STRING_LITERAL
1515
| C_STRING_LITERAL
1616
| RAW_C_STRING_LITERAL
17-
| INTEGER_LITERAL
1817
| FLOAT_LITERAL
18+
| INTEGER_LITERAL
1919
| LIFETIME_TOKEN
2020
| PUNCTUATION
2121
| IDENTIFIER_OR_KEYWORD

0 commit comments

Comments
 (0)