mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add support for menhir (OCaml parser generator)
This commit is contained in:
parent
1a563fc689
commit
82036f8db8
4 changed files with 42 additions and 0 deletions
|
|
@ -227,6 +227,9 @@
|
|||
"ocamllex": {
|
||||
"revision": "ac1d5957e719d49bd6acd27439b79843e4daf8ed"
|
||||
},
|
||||
"menhir": {
|
||||
"revision": "db7953acb0d5551f207373c81fa07a57d7b085cb"
|
||||
},
|
||||
"org": {
|
||||
"revision": "698bb1a34331e68f83fc24bdd1b6f97016bb30de"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -471,6 +471,15 @@ list.ocamllex = {
|
|||
maintainers = { "@undu" },
|
||||
}
|
||||
|
||||
list.menhir = {
|
||||
install_info = {
|
||||
url = "https://github.com/Kerl13/tree-sitter-menhir",
|
||||
files = { "src/parser.c", "src/scanner.cc" },
|
||||
},
|
||||
maintainers = { "@Kerl13" },
|
||||
filetype = "menhir",
|
||||
}
|
||||
|
||||
list.org = {
|
||||
install_info = {
|
||||
url = "https://github.com/milisims/tree-sitter-org",
|
||||
|
|
|
|||
29
queries/menhir/highlights.scm
Normal file
29
queries/menhir/highlights.scm
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
["%parameter" "%token" "%type" "%start" "%attribute" "%left" "%right" "%nonassoc" "%public" "%inline" "%prec"] @keyword
|
||||
["%on_error_reduce"] @exception
|
||||
|
||||
["let"] @keyword.function
|
||||
|
||||
[(equality_symbol) ":" "|" ";" ","] @punctuation.delimiter
|
||||
|
||||
["=" "~" "_"] @operator
|
||||
(modifier) @operator
|
||||
|
||||
["<" ">" "{" "}" "%{" "%}" "%%"] @punctuation.special
|
||||
|
||||
["(" ")"] @punctuation.bracket
|
||||
|
||||
(old_rule [(symbol)] @function)
|
||||
(new_rule [(lid)] @function)
|
||||
|
||||
(precedence [(symbol)] @parameter)
|
||||
|
||||
(funcall) @function.call
|
||||
|
||||
; Not very accurant but does a decent job
|
||||
(uid) @constant
|
||||
|
||||
(ocaml_type) @type
|
||||
(ocaml) @none
|
||||
|
||||
[(comment) (line_comment) (ocaml_comment)] @comment
|
||||
(ERROR) @error
|
||||
1
queries/menhir/injections.scm
Normal file
1
queries/menhir/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(ocaml) @ocaml
|
||||
Loading…
Add table
Add a link
Reference in a new issue