mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
fix filter for binder
This commit is contained in:
parent
7dcfc314d4
commit
ef3868c896
@ -4,7 +4,7 @@ import ctypes
|
||||
import GTestTask
|
||||
import PikaMath
|
||||
import PikaStdDevice
|
||||
# import test_module1
|
||||
import test_module1
|
||||
|
||||
|
||||
|
||||
|
@ -52,9 +52,34 @@ impl Compiler {
|
||||
if package_name == "PikaObj" {
|
||||
return compiler;
|
||||
}
|
||||
/* add to script */
|
||||
class_now.script_list.add(&line);
|
||||
|
||||
/* check file, break if *.py no found */
|
||||
match Compiler::open_file(format!("{}{}.pyi", compiler.source_path, package_name)) {
|
||||
Ok(_) => {}
|
||||
Err(_) => {
|
||||
/* if *.py exits, not print warning */
|
||||
match Compiler::open_file(format!(
|
||||
"{}{}.py",
|
||||
compiler.source_path, package_name
|
||||
)) {
|
||||
Ok(_) => {
|
||||
return compiler;
|
||||
}
|
||||
Err(_) => {
|
||||
println!(
|
||||
" [warning]: file: '{}{}.pyi' or '{}{}.py' no found",
|
||||
compiler.source_path, file_name, compiler.source_path, file_name
|
||||
);
|
||||
return compiler;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
let package_obj_define = format!("{} = {}()", package_name, package_name);
|
||||
class_now.push_object(package_obj_define, &file_name);
|
||||
class_now.script_list.add(&line);
|
||||
return Compiler::__do_analize_file(compiler, package_name.to_string(), true);
|
||||
}
|
||||
class_now.script_list.add(&line);
|
||||
|
Loading…
x
Reference in New Issue
Block a user