Skip to content

Commit

Permalink
Merge pull request #7 from demin-dmitriy/master
Browse files Browse the repository at this point in the history
Fix `assert`, `with` not being recognized as keywords
  • Loading branch information
wmertens authored Jul 4, 2017
2 parents 5fa227a + 867366e commit ebf0657
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: (?![\w'-])(with|assert)(?![\w'-])
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: (?![\w'-])(if|then|else|assert|with|let|in|rec|inherit)(?![\w'-])
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>(?![\w'-])(if|then|else|assert|with|let|in|rec|inherit)(?![\w'-])</string>
<string>(?&lt;![\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>(?![\w'-])(with|assert)(?![\w'-])</string>
<string>(?&lt;![\w'-])(with|assert)(?![\w'-])</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
Expand Down

0 comments on commit ebf0657

Please sign in to comment.