Skip to content

Commit 7baad0a

Browse files
committed
Make the FLOAT_LITERAL rule about final . more accurate
The previous phrasing missed raw identifiers, raw string literals, and byte literals. Writing in terms of characters rather than tokens matches the implementation more closely.
1 parent 8aa8b9a commit 7baad0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tokens.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ let horse = example.0b10; // ERROR no field named `0b10`
441441
> **<sup>Lexer</sup>**\
442442
> FLOAT_LITERAL :\
443443
> &nbsp;&nbsp; &nbsp;&nbsp; DEC_LITERAL `.`
444-
> _(not immediately followed by `.`, `_` or an [identifier] or [keyword][keywords]_)\
444+
> _(not immediately followed by `.`, `_` or an XID_Start character)_\
445445
> &nbsp;&nbsp; | DEC_LITERAL FLOAT_EXPONENT\
446446
> &nbsp;&nbsp; | DEC_LITERAL `.` DEC_LITERAL FLOAT_EXPONENT<sup>?</sup>\
447447
> &nbsp;&nbsp; | DEC_LITERAL (`.` DEC_LITERAL)<sup>?</sup>
@@ -524,7 +524,7 @@ Examples of such tokens:
524524
> &nbsp;&nbsp; &nbsp;&nbsp; BIN_LITERAL \[`2`-`9`&ZeroWidthSpace;]\
525525
> &nbsp;&nbsp; | OCT_LITERAL \[`8`-`9`&ZeroWidthSpace;]\
526526
> &nbsp;&nbsp; | ( BIN_LITERAL | OCT_LITERAL | HEX_LITERAL ) `.` \
527-
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; _(not immediately followed by `.`, `_` or an [identifier] or [keyword][keywords]_)\
527+
> &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; _(not immediately followed by `.`, `_` or an XID_Start character)_\
528528
> &nbsp;&nbsp; | ( BIN_LITERAL | OCT_LITERAL ) `e`\
529529
> &nbsp;&nbsp; | `0b` `_`<sup>\*</sup> _end of input or not BIN_DIGIT_\
530530
> &nbsp;&nbsp; | `0o` `_`<sup>\*</sup> _end of input or not OCT_DIGIT_\

0 commit comments

Comments
 (0)