diff options
| author | Pieter Goetschalckx <pieter@gtschlckx.be> | 2023-06-01 03:28:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-01 10:28:00 +0900 |
| commit | a6063b22c9e6d8660b82255d251c19d150725d9f (patch) | |
| tree | 36da57fdcab66dec3f7fd89db571255258153f04 /queries/ocaml | |
| parent | Update parsers: c, cpp, cuda, gitcommit, glsl, go, hlsl, scala, supercollider (diff) | |
| download | nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar.gz nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar.bz2 nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar.lz nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar.xz nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.tar.zst nvim-treesitter-a6063b22c9e6d8660b82255d251c19d150725d9f.zip | |
highlights(ocaml): update operators (#4878)
* Update ocaml highlights
* Don't capture operator twice
Diffstat (limited to 'queries/ocaml')
| -rw-r--r-- | queries/ocaml/highlights.scm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/queries/ocaml/highlights.scm b/queries/ocaml/highlights.scm index ef045f1b1..db70575e8 100644 --- a/queries/ocaml/highlights.scm +++ b/queries/ocaml/highlights.scm @@ -47,13 +47,13 @@ (infix_expression left: (value_path (value_name) @function) - (infix_operator) @operator - (#eq? @operator "@@")) + operator: (concat_operator) @_operator + (#eq? @_operator "@@")) (infix_expression - (infix_operator) @operator + operator: (rel_operator) @_operator right: (value_path (value_name) @function) - (#eq? @operator "|>")) + (#eq? @_operator "|>")) (application_expression function: (value_path (value_name) @function)) @@ -143,7 +143,14 @@ [ (prefix_operator) (sign_operator) - (infix_operator) + (pow_operator) + (mult_operator) + (add_operator) + (concat_operator) + (rel_operator) + (and_operator) + (or_operator) + (assign_operator) (hash_operator) (indexing_operator) (let_operator) @@ -153,14 +160,7 @@ (match_expression (match_operator) @keyword) -(value_definition [(let_operator) (and_operator)] @keyword) - -;; TODO: this is an error now -;(prefix_operator "!" @operator) - -(infix_operator ["&" "+" "-" "=" ">" "|" "%"] @operator) - -(signed_number ["+" "-"] @operator) +(value_definition [(let_operator) (let_and_operator)] @keyword) ["*" "#" "::" "<-"] @operator |
