remove decrease intrinsic+update editor support
This commit is contained in:
parent
34f52ae864
commit
d7c6cada32
@ -24,6 +24,6 @@ rules:
|
||||
- type: "\\b(bool|int|str)\\b"
|
||||
- symbol.operator: "([-+<>]|==|!=|=>|print(ln)?)"
|
||||
- identifier: "\\b(if|else|while)\\b"
|
||||
- special: "\\b(deq|swp|dup|req|depth|decrease)\\b"
|
||||
- special: "\\b(deq|swp|dup|req|depth)\\b"
|
||||
- special: "\\?\\?\\?"
|
||||
- statement: "arr"
|
BIN
editor/vscode/kurz-lang/icons/kurz-dark.png
Normal file
BIN
editor/vscode/kurz-lang/icons/kurz-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 760 B |
BIN
editor/vscode/kurz-lang/icons/kurz-light.png
Normal file
BIN
editor/vscode/kurz-lang/icons/kurz-light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 743 B |
@ -14,7 +14,11 @@
|
||||
"id": "kurz",
|
||||
"aliases": ["kurz", "kurz"],
|
||||
"extensions": [".qbl"],
|
||||
"configuration": "./language-configuration.json"
|
||||
"configuration": "./language-configuration.json",
|
||||
"icon": {
|
||||
"light": "./icons/kurz-light.png",
|
||||
"dark": "./icons/kurz-dark.png"
|
||||
}
|
||||
}],
|
||||
"grammars": [{
|
||||
"language": "kurz",
|
||||
|
@ -45,7 +45,7 @@
|
||||
},
|
||||
{
|
||||
"name": "support.function.kurz",
|
||||
"match": "\\b(deq|swp|dup|req|depth|decrease)\\b"
|
||||
"match": "\\b(deq|swp|dup|req|depth)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control",
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user