Merge branch 'master' into feat-cli

This commit is contained in:
Samuel Durante 2022-07-14 20:56:15 -03:00 committed by GitHub
commit 3c4afcb8d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -7,4 +7,4 @@ edition = "2021"
[dependencies]
hvm = "0.1.40"
clap = { version = "3.1.8", features = ["derive"] }
clap = { version = "3.1.8", features = ["derive"] }

View File

@ -17,7 +17,6 @@ fn main() {
eprintln!("{}", err);
}
};
}
// ------------------------------------------------------------
// ------------------------------------------------------------
@ -38,6 +37,7 @@ fn run_cli() -> Result<(), String> {
}
fn kind2(path: &str, main_function: &str) -> Result<(), String> {
// Reads definitions from file
let file = match std::fs::read_to_string(path) {
Ok(code) => read_file(&code),
Err(msg) => {
@ -81,6 +81,10 @@ fn kind2(path: &str, main_function: &str) -> Result<(), String> {
Ok(())
}
// ------------------------------------------------------------
// ------------------------------------------------------------
// ------------------------------------------------------------
fn debug_print_parser_state(txt: &str, state: &parser::State) {
println!("{} ||{}", txt, &state.code[state.index..state.index+32].replace("\n"," || "));
}