From d05586618fe992553a2d18f72baa299c85b8b9a9 Mon Sep 17 00:00:00 2001 From: Morgan <98441016+morganholly@users.noreply.github.com> Date: Tue, 26 Apr 2022 16:17:59 -0400 Subject: [PATCH 1/3] handle `of` as a binary keyword only match `of` as a control keyword if it is not in an if/elif/when and is followed by a colon --- syntaxes/nim.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntaxes/nim.json b/syntaxes/nim.json index f638983..1395ad9 100644 --- a/syntaxes/nim.json +++ b/syntaxes/nim.json @@ -148,7 +148,7 @@ }, { "comment": "Keywords that affect program control flow or scope.", - "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield|(static(?= *:))|of)\\b", + "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|(? Date: Tue, 26 Apr 2022 16:22:27 -0400 Subject: [PATCH 2/3] add while conditional --- syntaxes/nim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/nim.json b/syntaxes/nim.json index 1395ad9..4367495 100644 --- a/syntaxes/nim.json +++ b/syntaxes/nim.json @@ -148,7 +148,7 @@ }, { "comment": "Keywords that affect program control flow or scope.", - "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|(? Date: Tue, 26 Apr 2022 19:03:42 -0400 Subject: [PATCH 3/3] initial change to allow case in if/etc this doesn't allow any closing parens before the colon, and i think it could be possible to have a that be an issue. i will work on the regex more later when i have time again --- syntaxes/nim.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/nim.json b/syntaxes/nim.json index 4367495..084fa31 100644 --- a/syntaxes/nim.json +++ b/syntaxes/nim.json @@ -148,7 +148,7 @@ }, { "comment": "Keywords that affect program control flow or scope.", - "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|(?