diff --git a/editor/micro/kurz.yaml b/editor/micro/kurz.yaml index 0ae4d46..287a49a 100644 --- a/editor/micro/kurz.yaml +++ b/editor/micro/kurz.yaml @@ -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" \ No newline at end of file diff --git a/editor/vscode/kurz-lang/icons/kurz-dark.png b/editor/vscode/kurz-lang/icons/kurz-dark.png new file mode 100644 index 0000000..f03868b Binary files /dev/null and b/editor/vscode/kurz-lang/icons/kurz-dark.png differ diff --git a/editor/vscode/kurz-lang/icons/kurz-light.png b/editor/vscode/kurz-lang/icons/kurz-light.png new file mode 100644 index 0000000..99281e1 Binary files /dev/null and b/editor/vscode/kurz-lang/icons/kurz-light.png differ diff --git a/editor/vscode/kurz-lang/package.json b/editor/vscode/kurz-lang/package.json index b6247ca..566d483 100644 --- a/editor/vscode/kurz-lang/package.json +++ b/editor/vscode/kurz-lang/package.json @@ -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", diff --git a/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json b/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json index d7cbc0b..0256efe 100644 --- a/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json +++ b/editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json @@ -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", diff --git a/src/main.rs b/src/main.rs index fa58b7d..04ea829 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 = env::args().collect(); if args.len() < 2 @@ -901,11 +900,6 @@ fn interpret_program(operations: &Vec, queue: &mut Vec, funct let second = queue.remove(0).parse::().unwrap(); queue.push((first && second).to_string()); } - "decrease" => - { - let val = queue.remove(0).parse::().unwrap(); - queue.push((val - 1).to_string()); - } "println" => { output += format!("{}\n", queue.remove(0)).as_str();