diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2022-11-21 15:32:29 +0200 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2022-11-26 13:17:51 +0200 |
| commit | f8c848801a8b22c9d9b5bf090fcc5e715a214476 (patch) | |
| tree | 4dfa9237a02f8eb4a7087d7fd120fc05efa8fa18 | |
| parent | highlights(graphql): fix captures (diff) | |
| download | nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar.gz nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar.bz2 nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar.lz nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar.xz nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.tar.zst nvim-treesitter-f8c848801a8b22c9d9b5bf090fcc5e715a214476.zip | |
highlights(lalrpop): fix captures
| -rw-r--r-- | queries/lalrpop/highlights.scm | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/queries/lalrpop/highlights.scm b/queries/lalrpop/highlights.scm index 34040dd5f..b6fda252e 100644 --- a/queries/lalrpop/highlights.scm +++ b/queries/lalrpop/highlights.scm @@ -1,57 +1,60 @@ [ - "pub" - "grammar" - "match" - "extern" - "type" - "enum" + "enum" + "extern" + "grammar" + "match" + "type" + "pub" ] @keyword [ - "+" - "*" - "?" + "match" + "else" +] @conditional + +[ + "+" + "*" + "?" + ; TODO: inaccessible node + ; => + "=>@L" + "=>@R" ] @operator (grammar_type_params - "<" @punctuation.bracket - ">" @punctuation.bracket) + ["<" ">"] @punctuation.bracket) (symbol - "<" @punctuation.bracket - ">" @punctuation.bracket) + ["<" ">"] @punctuation.bracket) (binding_symbol - "<" @punctuation.bracket - ">" @punctuation.bracket) + ["<" ">"] @punctuation.bracket) (binding_symbol - name: (identifier) @parameter) + name: (identifier) @parameter) (bare_symbol - (macro - ((macro_id) @function))) + (macro + ((macro_id) @type.definition))) (bare_symbol - (identifier) @function) + (identifier) @type.definition) (nonterminal_name - (macro_id) @function) + (macro_id) @type.definition) (nonterminal_name - (identifier) @function) + (identifier) @type.definition) (nonterminal - (type_ref) @type) + (type_ref) @type.builtin) -"(" @punctuation.bracket -")" @punctuation.bracket -"[" @punctuation.bracket -"]" @punctuation.bracket +["(" ")" "[" "]"] @punctuation.bracket -";" @punctuation.delimiter +[";" ":"] @punctuation.delimiter -(lifetime (identifier) @label) +(lifetime (identifier) @storageclass) (string_literal) @string (regex_literal) @string |
