Add support for menhir (OCaml parser generator)

This commit is contained in:
Martin Pépin 2022-09-01 19:36:23 +02:00 committed by Stephan Seitz
parent 1a563fc689
commit 82036f8db8
4 changed files with 42 additions and 0 deletions

View 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

View file

@ -0,0 +1 @@
(ocaml) @ocaml