diff --git a/tools/pikaCompiler/main.py b/tools/pikaCompiler/main.py index ee07e0e39..3271c078b 100644 --- a/tools/pikaCompiler/main.py +++ b/tools/pikaCompiler/main.py @@ -1,6 +1,7 @@ import Arm2D import PikaStdLib import ctypes +import module line = Arm2D.Line() res = line.on() diff --git a/tools/pikaCompiler/module.py b/tools/pikaCompiler/module.py new file mode 100644 index 000000000..e69de29bb diff --git a/tools/pikaCompiler/src/compiler.rs b/tools/pikaCompiler/src/compiler.rs index 0fc641676..819ed41d0 100644 --- a/tools/pikaCompiler/src/compiler.rs +++ b/tools/pikaCompiler/src/compiler.rs @@ -85,10 +85,18 @@ impl Compiler { let mut file = match file { Ok(file) => file, Err(_) => { - println!( - " [warning]: file: '{}{}.pyi' no found", - self.source_path, file_name - ); + /* if *.py exits, not print warning */ + let file_py = Compiler::open_file(format!("{}{}.py", self.source_path, file_name)); + match file_py { + Ok(file) => file, + Err(_) => { + println!( + " [warning]: file: '{}{}.pyi' no found", + self.source_path, file_name + ); + return self; + } + }; return self; } };