@@ -57,29 +57,42 @@ pub enum TokenKind {
57
57
// Multi-char tokens:
58
58
/// "// comment"
59
59
LineComment { doc_style : Option < DocStyle > } ,
60
+
60
61
/// `/* block comment */`
61
62
///
62
- /// Block comments can be recursive, so the sequence like `/* /* */`
63
+ /// Block comments can be recursive, so a sequence like `/* /* */`
63
64
/// will not be considered terminated and will result in a parsing error.
64
65
BlockComment { doc_style : Option < DocStyle > , terminated : bool } ,
65
- /// Any whitespace characters sequence.
66
+
67
+ /// Any whitespace character sequence.
66
68
Whitespace ,
69
+
67
70
/// "ident" or "continue"
68
- /// At this step keywords are also considered identifiers.
71
+ ///
72
+ /// At this step, keywords are also considered identifiers.
69
73
Ident ,
74
+
70
75
/// Like the above, but containing invalid unicode codepoints.
71
76
InvalidIdent ,
77
+
72
78
/// "r#ident"
73
79
RawIdent ,
74
- /// An unknown prefix like `foo#`, `foo'`, `foo"`. Note that only the
80
+
81
+ /// An unknown prefix, like `foo#`, `foo'`, `foo"`.
82
+ ///
83
+ /// Note that only the
75
84
/// prefix (`foo`) is included in the token, not the separator (which is
76
85
/// lexed as its own distinct token). In Rust 2021 and later, reserved
77
86
/// prefixes are reported as errors; in earlier editions, they result in a
78
87
/// (allowed by default) lint, and are treated as regular identifier
79
88
/// tokens.
80
89
UnknownPrefix ,
81
- /// "12_u8", "1.0e-40", "b"123"". See `LiteralKind` for more details.
90
+
91
+ /// Examples: `"12_u8"`, `"1.0e-40"`, `b"123`.
92
+ ///
93
+ /// See [LiteralKind] for more details.
82
94
Literal { kind : LiteralKind , suffix_start : u32 } ,
95
+
83
96
/// "'a"
84
97
Lifetime { starts_with_number : bool } ,
85
98
0 commit comments