From dab6b3d09ede37f3236adaaaa251328dc90d3ac6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Mon, 20 Jun 2022 23:54:34 +0300 Subject: [PATCH] highlight keywords --- packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml b/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml index 69daaddb..a7f16539 100644 --- a/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml +++ b/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml @@ -16,6 +16,7 @@ repository: - include: "#string" - include: "#block" - include: "#function-call" + - include: "#keywords" let: match: ^\s*(\w+)\s*= captures: @@ -78,6 +79,9 @@ repository: name: punctuation.definition.block.squiggle patterns: - include: "$self" + keywords: + match: \b(if|then|else|to)\b + name: keyword.control.squiggle integer: match: \b\d+([_a-zA-Z]+[_a-zA-Z0-9]*)? name: constant.numeric.integer.squiggle