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 05423e75c5
commit 65a059b34d
2 changed files with 20 additions and 9 deletions

View file

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

View file

@ -6,24 +6,35 @@
; Keywords
(statement_keyword) @keyword
(extension_keyword) @string.escape
(statement_keyword "import") @include
(extension_keyword) @function
; Arguments
(built_in_type) @type.builtin
(integer) @number
(number) @number
(boolean) @boolean
(date) @number
(range) @string.escape
(unquoted_range) @string.escape
(yang_version) @string.escape
(range (_ ".." @punctuation.special))
(range (_ "|" @punctuation.special))
(quoted_range "\"" @string.special)
(quoted_range "'" @string.special)
(yang_version) @constant.builtin
(identifier) @variable
(node_identifier) @variable
(glob) @string
(string) @string
(string (escape_sequence) @string.escape)
(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
(plus_symbol) @punctuation.delimiter
(plus_symbol) @operator
["{" "}"] @punctuation.bracket
[";"] @punctuation.delimiter