Skip to content

Commit 81aa2d2

Browse files
committed
Remove TokenKind::InvalidPrefix.
It was added in #123752 to handle some cases involving emoji, but it isn't necessary because it's always treated the same as `TokenKind::InvalidIdent`. This commit removes it, which makes things a little simpler.
1 parent 9ae79a6 commit 81aa2d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/parser/src/lexed_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl<'a> Converter<'a> {
183183
rustc_lexer::TokenKind::Ident => {
184184
SyntaxKind::from_keyword(token_text, self.edition).unwrap_or(IDENT)
185185
}
186-
rustc_lexer::TokenKind::InvalidPrefix | rustc_lexer::TokenKind::InvalidIdent => {
186+
rustc_lexer::TokenKind::InvalidIdent => {
187187
err = "Ident contains invalid characters";
188188
IDENT
189189
}

0 commit comments

Comments
 (0)