Update YANG parser revision and highlights query

This commit is contained in:
Tomas Sandven 2021-07-23 17:41:24 +02:00 committed by Stephan Seitz
parent 6d336f9e3d
commit b1ce959946
2 changed files with 20 additions and 9 deletions

View file

@ -198,7 +198,7 @@
"revision": "0e36bed171768908f331ff7dff9d956bae016efb" "revision": "0e36bed171768908f331ff7dff9d956bae016efb"
}, },
"yang": { "yang": {
"revision": "887204bbaff4e95bb13543d2544ebec609249d32" "revision": "eb4ace1fdc4954d7e4f0687c687219f78a6ce64e"
}, },
"zig": { "zig": {
"revision": "05d6f44e5ae8fe986a7ca09ce2a301aa5148a20f" "revision": "05d6f44e5ae8fe986a7ca09ce2a301aa5148a20f"

View file

@ -6,24 +6,35 @@
; Keywords ; Keywords
(statement_keyword) @keyword (statement_keyword) @keyword
(extension_keyword) @string.escape (statement_keyword "import") @include
(extension_keyword) @function
; Arguments ; Arguments
(built_in_type) @type.builtin (built_in_type) @type.builtin
(integer) @number (number) @number
(boolean) @boolean (boolean) @boolean
(date) @number (date) @number
(range) @string.escape (range (_ ".." @punctuation.special))
(unquoted_range) @string.escape (range (_ "|" @punctuation.special))
(yang_version) @string.escape (quoted_range "\"" @string.special)
(quoted_range "'" @string.special)
(yang_version) @constant.builtin
(identifier) @variable (identifier) @variable
(node_identifier) @variable (node_identifier) @variable
(glob) @string
(string) @string (string) @string
(string (escape_sequence) @string.escape)
(unquoted_string) @string (unquoted_string) @string
(keypath) @string.escape (keypath) @string.special
; Always highlight the value of an enum statement as a string
(enum_value) @string
; Highlight xpath and pattern strings differently from plain strings
(statement
(statement_keyword ["pattern" "must"])
(argument (string) @string.special))
; Punctuation ; Punctuation
(plus_symbol) @punctuation.delimiter (plus_symbol) @operator
["{" "}"] @punctuation.bracket ["{" "}"] @punctuation.bracket
[";"] @punctuation.delimiter [";"] @punctuation.delimiter