mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Make the main program parse from parser and run with vm
This commit is contained in:
1 parent
11557e98eb
commit
2d0e4efecf
9 files changed
+98
-8
No files matched your search
@@ -33,6 +33,17 @@ pub struct PyCodeObject {
|
||||
pub co_varnames: Vec<String>,
|
||||
}
|
||||
|
||||
impl PyCodeObject {
|
||||
pub fn new() -> PyCodeObject {
|
||||
PyCodeObject {
|
||||
co_consts: Vec::<NativeType>::new(),
|
||||
co_names: Vec::<String>::new(),
|
||||
co_code: Vec::<(usize, String, Option<usize>)>::new(), //size, name, args
|
||||
co_varnames: Vec::<String>::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Function {
|
||||
pub code: PyCodeObject
|
||||
|
||||
Reference in new issue
Block a user