Compare commits

..

No commits in common. "ae9634fee69b2830209ffe4fc673067ded7fc432" and "e258f6208d7d4bc88e59f4304aa6391d7f66f6db" have entirely different histories.

3 changed files with 4 additions and 8 deletions

2
Cargo.lock generated
View file

@ -99,7 +99,7 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]] [[package]]
name = "granite" name = "granite"
version = "1.2.0" version = "1.1.0"
dependencies = [ dependencies = [
"clap", "clap",
] ]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "granite" name = "granite"
version = "1.2.0" version = "1.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]

View file

@ -183,12 +183,8 @@ fn execute(program: Program) {
let label_loc = labels.get(&statement.arguments[0]).unwrap(); let label_loc = labels.get(&statement.arguments[0]).unwrap();
current_statement = label_loc.clone(); current_statement = label_loc.clone();
} else { } else {
let binding = statement.arguments[0].clone().parse::<usize>(); println!("Numerical type issues.");
if binding.is_ok() { current_statement = binding.unwrap(); } exit(1);
else {
println!("Numerical type issues.");
exit(1);
}
} }
} else if statement.operator == "a" { } else if statement.operator == "a" {
if vars.contains_key(&statement.arguments[0]) && vars.contains_key(&statement.arguments[1]) { if vars.contains_key(&statement.arguments[0]) && vars.contains_key(&statement.arguments[1]) {