mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
Rename parser mode from Jupyter
to Ipython
(#7153)
This commit is contained in:
parent
e02d76f070
commit
1adde24133
9 changed files with 35 additions and 41 deletions
|
@ -45,7 +45,7 @@ pub enum Tok {
|
|||
triple_quoted: bool,
|
||||
},
|
||||
/// Token value for IPython escape commands. These are recognized by the lexer
|
||||
/// only when the mode is [`Mode::Jupyter`].
|
||||
/// only when the mode is [`Mode::Ipython`].
|
||||
IpyEscapeCommand {
|
||||
/// The magic command value.
|
||||
value: String,
|
||||
|
@ -64,7 +64,7 @@ pub enum Tok {
|
|||
/// Token value for a dedent.
|
||||
Dedent,
|
||||
EndOfFile,
|
||||
/// Token value for a question mark `?`. This is only used in [`Mode::Jupyter`].
|
||||
/// Token value for a question mark `?`. This is only used in [`Mode::Ipython`].
|
||||
Question,
|
||||
/// Token value for a left parenthesis `(`.
|
||||
Lpar,
|
||||
|
@ -211,7 +211,7 @@ pub enum Tok {
|
|||
impl Tok {
|
||||
pub fn start_marker(mode: Mode) -> Self {
|
||||
match mode {
|
||||
Mode::Module | Mode::Jupyter => Tok::StartModule,
|
||||
Mode::Module | Mode::Ipython => Tok::StartModule,
|
||||
Mode::Expression => Tok::StartExpression,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue