From 194aeae43cf48d0096afb8d137590fffee88b50e Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 18 Jul 2023 13:21:51 -0500 Subject: [PATCH] Implement `TokenKind` for type aliases (#5870) Part of https://github.com/astral-sh/ruff/issues/5062 --- crates/ruff_python_ast/src/token_kind.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruff_python_ast/src/token_kind.rs b/crates/ruff_python_ast/src/token_kind.rs index 89b88c7fccc9d6..4c90f3c30fb0fc 100644 --- a/crates/ruff_python_ast/src/token_kind.rs +++ b/crates/ruff_python_ast/src/token_kind.rs @@ -156,6 +156,7 @@ pub enum TokenKind { Try, While, Match, + Type, Case, With, Yield, @@ -426,13 +427,13 @@ impl TokenKind { Tok::While => TokenKind::While, Tok::Match => TokenKind::Match, Tok::Case => TokenKind::Case, + Tok::Type => TokenKind::Type, Tok::With => TokenKind::With, Tok::Yield => TokenKind::Yield, Tok::StartModule => TokenKind::StartModule, Tok::StartInteractive => TokenKind::StartInteractive, Tok::StartExpression => TokenKind::StartExpression, Tok::MagicCommand { .. } => todo!(), - Tok::Type => todo!(), } } }