mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-29 06:44:42 +00:00
Remove parser dependency from ruff-python-ast (#6096)
This commit is contained in:
parent
99127243f4
commit
2cf00fee96
658 changed files with 1714 additions and 1546 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue