Skip to content

Commit

Permalink
chore: in isn't a keyword in Ohm, but a terminal
Browse files Browse the repository at this point in the history
For example, functions can be named `in()`. This behavior may change
with Tact 2.0 though.
  • Loading branch information
novusnota committed Jun 19, 2024
1 parent 92b90d3 commit 81dc3bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package/Tact.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -725,15 +725,15 @@
<key>comment</key>
<string>Control flow keywords, prefixed by more than one dot</string>
<key>match</key>
<string>(?&lt;=\.\.)\b(else|catch|until|in)\b</string>
<string>(?&lt;=\.\.)\b(else|catch|until|in(?!\s*\())\b</string>
<key>name</key>
<string>keyword.control.tact</string>
</dict>
<dict>
<key>comment</key>
<string>Control flow keywords</string>
<key>match</key>
<string>(?&lt;!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\b</string>
<string>(?&lt;!\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\s*\()|return)\b</string>
<key>name</key>
<string>keyword.control.tact</string>
</dict>
Expand Down Expand Up @@ -871,4 +871,4 @@
</dict>
</dict>
</dict>
</plist>
</plist>
4 changes: 2 additions & 2 deletions package/Tact.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "(?<!\\.)\\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\\b",
"match": "(?<!\\.)\\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\\s*\\()|return)\\b",
"name": "keyword.control.tact"
},
{
Expand Down

0 comments on commit 81dc3bb

Please sign in to comment.