Rename parser mode from Jupyter to Ipython (#7153)

This commit is contained in:
Dhruv Manilawala 2023-09-05 19:42:26 +05:30 committed by GitHub
parent e02d76f070
commit 1adde24133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 41 deletions

View file

@ -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,
}
}