mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
skip if requestment.txt no found
This commit is contained in:
parent
ee0997076c
commit
041e924967
@ -56,7 +56,7 @@ impl Compiler {
|
|||||||
|
|
||||||
pub fn analyze_file(mut compiler: Compiler, file_name: String, is_top_pkg: bool) -> Compiler {
|
pub fn analyze_file(mut compiler: Compiler, file_name: String, is_top_pkg: bool) -> Compiler {
|
||||||
println!(
|
println!(
|
||||||
"(pikascript) compiling {}{}.py...",
|
"(PikaScript) compiling {}{}.py...",
|
||||||
compiler.source_path, file_name
|
compiler.source_path, file_name
|
||||||
);
|
);
|
||||||
let file = File::open(format!("{}{}.py", compiler.source_path, file_name));
|
let file = File::open(format!("{}{}.py", compiler.source_path, file_name));
|
||||||
|
@ -20,6 +20,14 @@ impl VersionInfo {
|
|||||||
|
|
||||||
pub fn analyze_file(mut self, source_path: String) -> VersionInfo {
|
pub fn analyze_file(mut self, source_path: String) -> VersionInfo {
|
||||||
self.source_path = source_path;
|
self.source_path = source_path;
|
||||||
|
let file = File::open(&self.source_path);
|
||||||
|
let mut file = match file {
|
||||||
|
Ok(file) => file,
|
||||||
|
Err(_) => {
|
||||||
|
println!("(PikaScript) requestment.txt no found.");
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
};
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user