Remove unused parser modes

<!--
Thank you for contributing to Ruff! To help us out with reviewing, please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This PR removes the `Interactive` and `FunctionType` parser modes that are unused by ruff

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

`cargo test`

<!-- How was it tested? -->
This commit is contained in:
Micha Reiser 2023-08-01 13:10:07 +02:00 committed by GitHub
parent 7c7231db2e
commit f45e8645d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 15156 additions and 15587 deletions

View file

@ -31,7 +31,7 @@ where
pub fn new(lexer: I, mode: Mode) -> Self {
Self {
underlying: lexer.multipeek(), // spell-checker:ignore multipeek
start_of_line: matches!(mode, Mode::Interactive | Mode::Module),
start_of_line: matches!(mode, Mode::Module),
}
}
}
@ -140,11 +140,7 @@ where
matches!(
tok,
Tok::StartModule
| Tok::StartInteractive
| Tok::Newline
| Tok::Indent
| Tok::Dedent
Tok::StartModule | Tok::Newline | Tok::Indent | Tok::Dedent
)
})
});