@@ -18,6 +18,8 @@ mod cursor;
18
18
pub mod unescape;
19
19
20
20
use crate :: cursor:: { Cursor , EOF_CHAR } ;
21
+ use self :: TokenKind :: * ;
22
+ use self :: LiteralKind :: * ;
21
23
22
24
/// Parsed token.
23
25
/// It doesn't contain information about data that has been parsed,
@@ -116,7 +118,6 @@ pub enum TokenKind {
116
118
/// Unknown token, not expected by the lexer, e.g. "№"
117
119
Unknown ,
118
120
}
119
- use self :: TokenKind :: * ;
120
121
121
122
#[ derive( Clone , Copy , Debug , PartialEq , Eq , PartialOrd , Ord ) ]
122
123
pub enum LiteralKind {
@@ -137,7 +138,6 @@ pub enum LiteralKind {
137
138
/// "br"abc"", "br#"abc"#", "br####"ab"###"c"####", "br#"a"
138
139
RawByteStr { n_hashes : usize , started : bool , terminated : bool } ,
139
140
}
140
- use self :: LiteralKind :: * ;
141
141
142
142
/// Base of numeric literal encoding according to its prefix.
143
143
#[ derive( Clone , Copy , Debug , PartialEq , Eq , PartialOrd , Ord ) ]
@@ -241,7 +241,6 @@ pub fn is_id_continue(c: char) -> bool {
241
241
|| ( c > '\x7f' && unicode_xid:: UnicodeXID :: is_xid_continue ( c) )
242
242
}
243
243
244
-
245
244
impl Cursor < ' _ > {
246
245
/// Parses a token from the input string.
247
246
fn advance_token ( & mut self ) -> Token {
0 commit comments