Remove parser dependency from ruff-python-ast (#6096)

This commit is contained in:
Micha Reiser 2023-07-26 17:47:22 +02:00 committed by GitHub
parent 99127243f4
commit 2cf00fee96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
658 changed files with 1714 additions and 1546 deletions

View file

@ -189,6 +189,9 @@ pub enum SimpleTokenKind {
/// `if`
If,
/// `elif`
Elif,
/// `in`
In,
@ -295,6 +298,7 @@ impl<'a> SimpleTokenizer<'a> {
"as" => SimpleTokenKind::As,
"async" => SimpleTokenKind::Async,
"else" => SimpleTokenKind::Else,
"elif" => SimpleTokenKind::Elif,
"if" => SimpleTokenKind::If,
"in" => SimpleTokenKind::In,
"match" => SimpleTokenKind::Match, // Match is a soft keyword that depends on the context but we can always lex it as a keyword and leave it to the caller (parser) to decide if it should be handled as an identifier or keyword.