highlights(ocaml): update operators (#4878)

* Update ocaml highlights

* Don't capture operator twice
This commit is contained in:
Pieter Goetschalckx 2023-06-01 03:28:00 +02:00 committed by GitHub
parent 62146fe415
commit a6063b22c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View file

@ -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