From 466206539a635416d4c89de51d5c93b5d84cbef3 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:08:49 +0200 Subject: [PATCH] chore: `in` isn't a keyword in Ohm, but a terminal For example, functions can be named `in()`. This behavior may change with Tact 2.0 though. --- package/Tact.tmLanguage | 6 +++--- package/Tact.tmLanguage.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/Tact.tmLanguage b/package/Tact.tmLanguage index c1638d2..194e86e 100644 --- a/package/Tact.tmLanguage +++ b/package/Tact.tmLanguage @@ -725,7 +725,7 @@ comment Control flow keywords, prefixed by more than one dot match - (?<=\.\.)\b(else|catch|until|in)\b + (?<=\.\.)\b(else|catch|until|in(?!\s*\())\b name keyword.control.tact @@ -733,7 +733,7 @@ comment Control flow keywords match - (?<!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\b + (?<!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\s*\()|return)\b name keyword.control.tact @@ -871,4 +871,4 @@ - \ No newline at end of file + diff --git a/package/Tact.tmLanguage.json b/package/Tact.tmLanguage.json index 286e6fe..615ef7d 100644 --- a/package/Tact.tmLanguage.json +++ b/package/Tact.tmLanguage.json @@ -475,12 +475,12 @@ }, { "comment": "Control flow keywords, prefixed by more than one dot", - "match": "(?<=\\.\\.)\\b(else|catch|until|in)\\b", + "match": "(?<=\\.\\.)\\b(else|catch|until|in(?!\\s*\\())\\b", "name": "keyword.control.tact" }, { "comment": "Control flow keywords", - "match": "(?