summaryrefslogtreecommitdiff
path: root/queries
diff options
context:
space:
mode:
Diffstat (limited to 'queries')
-rw-r--r--queries/menhir/highlights.scm29
-rw-r--r--queries/menhir/injections.scm1
2 files changed, 30 insertions, 0 deletions
diff --git a/queries/menhir/highlights.scm b/queries/menhir/highlights.scm
new file mode 100644
index 00000000..64789ee4
--- /dev/null
+++ b/queries/menhir/highlights.scm
@@ -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
diff --git a/queries/menhir/injections.scm b/queries/menhir/injections.scm
new file mode 100644
index 00000000..7a31dd50
--- /dev/null
+++ b/queries/menhir/injections.scm
@@ -0,0 +1 @@
+(ocaml) @ocaml