mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-30 23:27:39 +00:00
Refactor Mode and partial parser/codegen for eval/exec
This commit is contained in:
parent
9c229ebb99
commit
3690272256
5 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,9 @@
|
|||
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/main/logo.png")]
|
||||
#![doc(html_root_url = "https://docs.rs/rustpython-bytecode/")]
|
||||
|
||||
mod mode;
|
||||
pub use mode::Mode;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use bstr::ByteSlice;
|
||||
use itertools::Itertools;
|
||||
|
|
|
@ -18,7 +18,7 @@ use rustpython_ast as ast;
|
|||
use rustpython_bytecode::{self as bytecode, CodeObject, ConstantData, Instruction};
|
||||
use std::borrow::Cow;
|
||||
|
||||
pub use crate::mode::Mode;
|
||||
pub use rustpython_bytecode::Mode;
|
||||
|
||||
type CompileResult<T> = Result<T, CompileError>;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ type IndexSet<T> = indexmap::IndexSet<T, ahash::RandomState>;
|
|||
pub mod compile;
|
||||
pub mod error;
|
||||
pub mod ir;
|
||||
pub mod mode;
|
||||
pub mod symboltable;
|
||||
|
||||
pub use compile::{CompileOpts, Mode};
|
||||
|
|
|
@ -6,6 +6,9 @@ use rustpython_parser::{
|
|||
};
|
||||
use std::fmt;
|
||||
|
||||
pub use rustpython_bytecode::Mode;
|
||||
pub use rustpython_codegen::compile::CompileOpts;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum CompileErrorType {
|
||||
#[error(transparent)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue