Skip to content

Commit

Permalink
fixed inferred error set highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
emekoi committed Jul 25, 2019
1 parent 8c64818 commit 6ebf77a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Syntaxes/Zig.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ repository:

patterns:
- include: '#main'

- match: '\b(error)(\.)([a-zA-Z_]\w*|@\".+\")'
captures:
'1':
name: storage.type.error.zig
'2':
name: punctuation.accessor.zig
'3':
name: entity.name.error.zig

constants:
patterns:
Expand Down
22 changes: 22 additions & 0 deletions Syntaxes/Zig.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,28 @@
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.error.zig</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.accessor.zig</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.error.zig</string>
</dict>
</dict>
<key>match</key>
<string>\b(error)(\.)([a-zA-Z_]\w*|@\".+\")</string>
</dict>
</array>
</dict>
<key>field_decl</key>
Expand Down
14 changes: 14 additions & 0 deletions Syntaxes/Zig.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,20 @@
"name": "storage.type.error.zig"
}
}
},
{
"match": "\\b(error)(\\.)([a-zA-Z_]\\w*|@\\\".+\\\")",
"captures": {
"1": {
"name": "storage.type.error.zig"
},
"3": {
"name": "entity.name.error.zig"
},
"2": {
"name": "punctuation.accessor.zig"
}
}
}
]
},
Expand Down

0 comments on commit 6ebf77a

Please sign in to comment.