Skip to content

Commit

Permalink
Merge pull request #4 from grahamc/master
Browse files Browse the repository at this point in the history
Allow assert to be used in function names
  • Loading branch information
wmertens authored Jun 1, 2017
2 parents cf33194 + 80d8dcd commit e5e1069
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nix.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ repository:
- include: '#others'

with-assert:
begin: \b(with|assert)\b
begin: (?![\w-'])(with|assert)(?![\w-'])
beginCaptures:
'0': {name: keyword.other.nix}
end: \;
Expand Down Expand Up @@ -602,5 +602,5 @@ repository:

bad-reserved:
# we don't mark "or" because it's a special case
match: \b(if|then|else|assert|with|let|in|rec|inherit)\b
match: (?![\w-'])(if|then|else|assert|with|let|in|rec|inherit)(?![\w-'])
name: invalid.illegal.reserved.nix
4 changes: 2 additions & 2 deletions nix.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
<key>bad-reserved</key>
<dict>
<key>match</key>
<string>\b(if|then|else|assert|with|let|in|rec|inherit)\b</string>
<string>(?![\w-'])(if|then|else|assert|with|let|in|rec|inherit)(?![\w-'])</string>
<key>name</key>
<string>invalid.illegal.reserved.nix</string>
</dict>
Expand Down Expand Up @@ -1770,7 +1770,7 @@
<key>with-assert</key>
<dict>
<key>begin</key>
<string>\b(with|assert)\b</string>
<string>(?![\w-'])(with|assert)(?![\w-'])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
Expand Down

0 comments on commit e5e1069

Please sign in to comment.