Skip to content

Commit 81dc3bb

Browse files
committed
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.
1 parent 92b90d3 commit 81dc3bb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package/Tact.tmLanguage

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,15 +725,15 @@
725725
<key>comment</key>
726726
<string>Control flow keywords, prefixed by more than one dot</string>
727727
<key>match</key>
728-
<string>(?&lt;=\.\.)\b(else|catch|until|in)\b</string>
728+
<string>(?&lt;=\.\.)\b(else|catch|until|in(?!\s*\())\b</string>
729729
<key>name</key>
730730
<string>keyword.control.tact</string>
731731
</dict>
732732
<dict>
733733
<key>comment</key>
734734
<string>Control flow keywords</string>
735735
<key>match</key>
736-
<string>(?&lt;!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\b</string>
736+
<string>(?&lt;!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\s*\()|return)\b</string>
737737
<key>name</key>
738738
<string>keyword.control.tact</string>
739739
</dict>
@@ -871,4 +871,4 @@
871871
</dict>
872872
</dict>
873873
</dict>
874-
</plist>
874+
</plist>

package/Tact.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,12 @@
475475
},
476476
{
477477
"comment": "Control flow keywords, prefixed by more than one dot",
478-
"match": "(?<=\\.\\.)\\b(else|catch|until|in)\\b",
478+
"match": "(?<=\\.\\.)\\b(else|catch|until|in(?!\\s*\\())\\b",
479479
"name": "keyword.control.tact"
480480
},
481481
{
482482
"comment": "Control flow keywords",
483-
"match": "(?<!\\.)\\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\\b",
483+
"match": "(?<!\\.)\\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\\s*\\()|return)\\b",
484484
"name": "keyword.control.tact"
485485
},
486486
{

0 commit comments

Comments
 (0)