@@ -10,8 +10,8 @@ extern crate rustyline;
10
10
use clap:: { App , Arg } ;
11
11
use rustpython_parser:: error:: ParseError ;
12
12
use rustpython_vm:: {
13
- compile, error:: CompileError , error:: CompileErrorType , frame:: Scope , import, obj:: objstr, print_exception ,
14
- pyobject:: PyResult , util, VirtualMachine ,
13
+ compile, error:: CompileError , error:: CompileErrorType , frame:: Scope , import, obj:: objstr,
14
+ print_exception , pyobject:: PyResult , util, VirtualMachine ,
15
15
} ;
16
16
use rustyline:: { error:: ReadlineError , Editor } ;
17
17
use std:: path:: { Path , PathBuf } ;
@@ -115,7 +115,12 @@ fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> Result<(), Com
115
115
Ok ( ( ) )
116
116
}
117
117
// Don't inject syntax errors for line continuation
118
- Err ( err @ CompileError { error : CompileErrorType :: Parse ( ParseError :: EOF ( _) ) , .. } ) => Err ( err) ,
118
+ Err (
119
+ err @ CompileError {
120
+ error : CompileErrorType :: Parse ( ParseError :: EOF ( _) ) ,
121
+ ..
122
+ } ,
123
+ ) => Err ( err) ,
119
124
Err ( err) => {
120
125
let exc = vm. new_syntax_error ( & err) ;
121
126
print_exception ( vm, & exc) ;
@@ -188,7 +193,10 @@ fn run_shell(vm: &VirtualMachine) -> PyResult {
188
193
}
189
194
190
195
match shell_exec ( vm, & input, vars. clone ( ) ) {
191
- Err ( CompileError { error : CompileErrorType :: Parse ( ParseError :: EOF ( _) ) , .. } ) => {
196
+ Err ( CompileError {
197
+ error : CompileErrorType :: Parse ( ParseError :: EOF ( _) ) ,
198
+ ..
199
+ } ) => {
192
200
continuing = true ;
193
201
continue ;
194
202
}
0 commit comments