mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
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
This commit is contained in:
parent
6de5ceba03
commit
06aa932bb8
2 changed files with 33 additions and 21 deletions
|
|
@ -336,7 +336,7 @@
|
|||
"revision": "11559418d8de82a2313504dc5bec9983d17ea4e9"
|
||||
},
|
||||
"ocamllex": {
|
||||
"revision": "ac1d5957e719d49bd6acd27439b79843e4daf8ed"
|
||||
"revision": "62118551bd9501b8253598b835cb4bef04b31e3d"
|
||||
},
|
||||
"odin": {
|
||||
"revision": "d165dbee27617dab2653e38737d96ede1030d14f"
|
||||
|
|
|
|||
|
|
@ -1,29 +1,41 @@
|
|||
|
||||
[(lexer_argument) (regexp_name) (any)] @type
|
||||
|
||||
(lexer_entry_name) @function
|
||||
|
||||
["as" "let" "and" "parse" "rule"] @keyword
|
||||
|
||||
[(eof) (character)] @character
|
||||
(string) @string
|
||||
; Allow OCaml highlighter
|
||||
|
||||
(ocaml) @none
|
||||
|
||||
(character_range "-" @operator)
|
||||
(character_set "^" @operator)
|
||||
(regexp_alternative ["|"] @operator)
|
||||
; 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_option ["?"] @operator)
|
||||
(regexp_repetition ["*"] @operator)
|
||||
(regexp_strict_repetition ["+"] @operator)
|
||||
(regexp_repetition ["?" "*" "+"] @operator)
|
||||
(regexp_alternative ["|"] @operator)
|
||||
|
||||
(action ["{" "}"] @punctuation.special)
|
||||
(character_set ["[" "]"] @punctuation.bracket)
|
||||
(parenthesized_regexp ["(" ")"] @punctuation.bracket)
|
||||
; Rules
|
||||
|
||||
["="] @punctuation.delimiter
|
||||
(lexer_entry "|" @punctuation.delimiter)
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue