aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ocamllex
diff options
context:
space:
mode:
authorPau Ruiz Safont <unduthegun@gmail.com>2020-09-28 22:59:11 +0100
committerStephan Seitz <stephan.lauf@yahoo.de>2020-10-04 14:33:29 +0200
commitf1c272676b0348c8c0bdf40b2b6a8e4be39e5756 (patch)
tree1167a1886afd9754e2b0bfc66eccf1938a1eabea /queries/ocamllex
parentAdd "External modules" section to README (diff)
downloadnvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar.gz
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar.bz2
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar.lz
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar.xz
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.tar.zst
nvim-treesitter-f1c272676b0348c8c0bdf40b2b6a8e4be39e5756.zip
feat: add ocamllex parser and highlights
Diffstat (limited to 'queries/ocamllex')
-rw-r--r--queries/ocamllex/highlights.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/queries/ocamllex/highlights.scm b/queries/ocamllex/highlights.scm
new file mode 100644
index 000000000..eb72102a7
--- /dev/null
+++ b/queries/ocamllex/highlights.scm
@@ -0,0 +1,27 @@
+
+[(lexer_argument) (regexp_name) (any)] @type
+
+(lexer_entry_name) @function
+
+["as" "let" "parse" "rule"] @keyword
+
+[(eof) (character)] @character
+(string) @string
+
+(character_range "-" @operator)
+(character_set "^" @operator)
+(regexp_alternative ["|"] @operator)
+(regexp_difference ["#"] @operator)
+(regexp_option ["?"] @operator)
+(regexp_repetition ["*"] @operator)
+(regexp_strict_repetition ["+"] @operator)
+
+(action ["{" "}"] @punctuation.special) @embedded
+(character_set ["[" "]"] @punctuation.bracket)
+(parenthesized_regexp ["(" ")"] @punctuation.bracket)
+
+["="] @punctuation.delimiter
+(lexer_entry "|" @punctuation.delimiter)
+
+(comment) @comment
+(ERROR) @error