diff --git a/package/Snippets/variable.sublime-snippet b/package/Snippets/variable.sublime-snippet index e45a58a..e285d84 100644 --- a/package/Snippets/variable.sublime-snippet +++ b/package/Snippets/variable.sublime-snippet @@ -1,5 +1,5 @@ - + variable source.tact let …: … = …; diff --git a/package/Tact.sublime-completions b/package/Tact.sublime-completions index a23ef1f..79d4cff 100644 --- a/package/Tact.sublime-completions +++ b/package/Tact.sublime-completions @@ -633,10 +633,10 @@ "details": "Tact Docs" }, { - "trigger": "nativeThrowWhen\tthrow exit code under condition", - "contents": "nativeThrowWhen(${1:code_Int}, ${2:condition_Bool})", + "trigger": "nativeThrowIf\tthrow exit code under condition", + "contents": "nativeThrowIf(${1:code_Int}, ${2:condition_Bool})", "kind": "function", - "details": "Tact Docs" + "details": "Tact Docs" }, { "trigger": "nativeThrowUnless\tthrow exit code unless condition", diff --git a/package/Tact.tmLanguage b/package/Tact.tmLanguage index fa5080b..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 @@ -849,12 +849,25 @@ variable - comment - Any valid Tact identifier - match - \b([a-zA-Z_][a-zA-Z0-9_]*)\b - name - variable.other.tact + patterns + + + comment + Any valid Tact identifier + match + (?<!\.)\b(_)\b + name + comment.unused-identifier.tact + + + comment + Any valid Tact identifier + match + \b([a-zA-Z_][a-zA-Z0-9_]*)\b + name + variable.other.tact + + diff --git a/package/Tact.tmLanguage.json b/package/Tact.tmLanguage.json index 6db90b0..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": "(?