remove decrease intrinsic+update editor support

This commit is contained in:
0x4261756D
2023-01-11 03:02:10 +01:00
parent 34f52ae864
commit d7c6cada32
6 changed files with 7 additions and 9 deletions

View File

@ -100,7 +100,6 @@ fn main()
("==", (Vec::from([Datatype::Int, Datatype::Int]), Vec::from([Datatype::Bool]))),
("!=", (Vec::from([Datatype::Int, Datatype::Int]), Vec::from([Datatype::Bool]))),
("&&", (Vec::from([Datatype::Bool, Datatype::Bool]), Vec::from([Datatype::Bool]))),
("decrease", (Vec::from([Datatype::Int]), Vec::from([Datatype::Int]))),
]);
let args: Vec<String> = env::args().collect();
if args.len() < 2
@ -901,11 +900,6 @@ fn interpret_program(operations: &Vec<Operation>, queue: &mut Vec<String>, funct
let second = queue.remove(0).parse::<bool>().unwrap();
queue.push((first && second).to_string());
}
"decrease" =>
{
let val = queue.remove(0).parse::<i64>().unwrap();
queue.push((val - 1).to_string());
}
"println" =>
{
output += format!("{}\n", queue.remove(0)).as_str();