mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-08 05:35:22 +00:00
Change compile::compile() to take a Mode instead of an &Mode
This commit is contained in:
parent
6128b2b46e
commit
11f4dc24dc
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,7 @@ struct Compiler<O: OutputStream = BasicOutputStream> {
|
|||
/// Compile a given sourcecode into a bytecode object.
|
||||
pub fn compile(
|
||||
source: &str,
|
||||
mode: &Mode,
|
||||
mode: Mode,
|
||||
source_path: String,
|
||||
optimize: u8,
|
||||
) -> Result<CodeObject, CompileError> {
|
||||
|
@ -102,6 +102,7 @@ pub fn compile_program_single(
|
|||
})
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum Mode {
|
||||
Exec,
|
||||
Eval,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue