Implement TokenKind for type aliases (#5870)

Part of https://github.com/astral-sh/ruff/issues/5062
This commit is contained in:
Zanie Blue 2023-07-18 13:21:51 -05:00 committed by GitHub
parent d5c43a45b3
commit 41da52a61b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,6 +156,7 @@ pub enum TokenKind {
Try, Try,
While, While,
Match, Match,
Type,
Case, Case,
With, With,
Yield, Yield,
@ -426,13 +427,13 @@ impl TokenKind {
Tok::While => TokenKind::While, Tok::While => TokenKind::While,
Tok::Match => TokenKind::Match, Tok::Match => TokenKind::Match,
Tok::Case => TokenKind::Case, Tok::Case => TokenKind::Case,
Tok::Type => TokenKind::Type,
Tok::With => TokenKind::With, Tok::With => TokenKind::With,
Tok::Yield => TokenKind::Yield, Tok::Yield => TokenKind::Yield,
Tok::StartModule => TokenKind::StartModule, Tok::StartModule => TokenKind::StartModule,
Tok::StartInteractive => TokenKind::StartInteractive, Tok::StartInteractive => TokenKind::StartInteractive,
Tok::StartExpression => TokenKind::StartExpression, Tok::StartExpression => TokenKind::StartExpression,
Tok::MagicCommand { .. } => todo!(), Tok::MagicCommand { .. } => todo!(),
Tok::Type => todo!(),
} }
} }
} }