nvim-treesitter/queries/ocamllex/highlights.scm
Pau Ruiz Safont 06aa932bb8
chore: update ocamllex
* Update parsers: ocamllex

Update its highlight to make it compatible with the new parser

* highlights(ocamllex): follow newest changes from upstream

The upstream grammar added highlights in the latest version, change our
highlight so they reflect better the intention of the grammar's author
2023-05-30 00:13:17 -04:00

41 lines
691 B
Scheme

; Allow OCaml highlighter
(ocaml) @none
; Regular expressions
(regexp_name) @variable
[(eof) (any)] @constant
(character) @character
(string) @string
(escape_sequence) @string.escape
(character_set "^" @punctuation.special)
(character_range "-" @punctuation.delimiter)
(regexp_difference ["#"] @operator)
(regexp_repetition ["?" "*" "+"] @operator)
(regexp_alternative ["|"] @operator)
; Rules
(lexer_entry_name) @function
(lexer_argument) @parameter
(lexer_entry ["=" "|"] @punctuation.delimiter)
; keywords
["and" "as" "let" "parse" "refill" "rule" "shortest"] @keyword
; Punctuation
["[" "]" "(" ")" "{" "}"] @punctuation.bracket
; Misc
(comment) @comment
(ERROR) @error