diff --git a/Cargo.toml b/Cargo.toml index f757059..3e60555 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "granite" -version = "1.1.0" +version = "1.2.0" edition = "2021" [dependencies] diff --git a/src/main.rs b/src/main.rs index eb87f03..eca872a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -183,8 +183,12 @@ fn execute(program: Program) { let label_loc = labels.get(&statement.arguments[0]).unwrap(); current_statement = label_loc.clone(); } else { - println!("Numerical type issues."); - exit(1); + let binding = statement.arguments[0].clone().parse::(); + if binding.is_ok() { current_statement = binding.unwrap(); } + else { + println!("Numerical type issues."); + exit(1); + } } } else if statement.operator == "a" { if vars.contains_key(&statement.arguments[0]) && vars.contains_key(&statement.arguments[1]) {