mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-19 19:15:43 +00:00
Switch from 64-bit instruction enum to out-of-line arg values
This commit is contained in:
parent
5cc208cc43
commit
da96cecfca
6 changed files with 1064 additions and 616 deletions
|
@ -6,8 +6,7 @@ use rustpython_parser::{
|
|||
};
|
||||
|
||||
pub use rustpython_codegen::compile::CompileOpts;
|
||||
pub use rustpython_compiler_core::CodeObject;
|
||||
pub use rustpython_compiler_core::{BaseError as CompileErrorBody, Mode};
|
||||
pub use rustpython_compiler_core::{BaseError as CompileErrorBody, CodeObject, Mode};
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum CompileErrorType {
|
||||
|
@ -29,7 +28,7 @@ pub fn compile(
|
|||
source: &str,
|
||||
mode: compile::Mode,
|
||||
source_path: String,
|
||||
opts: compile::CompileOpts,
|
||||
opts: CompileOpts,
|
||||
) -> Result<CodeObject, CompileError> {
|
||||
let mut ast = match parser::parse(source, mode.into(), &source_path) {
|
||||
Ok(x) => x,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue