Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/rescript/highlights.scm')
-rw-r--r--runtime/queries/rescript/highlights.scm132
1 files changed, 68 insertions, 64 deletions
diff --git a/runtime/queries/rescript/highlights.scm b/runtime/queries/rescript/highlights.scm
index 8decebb4..51d37b87 100644
--- a/runtime/queries/rescript/highlights.scm
+++ b/runtime/queries/rescript/highlights.scm
@@ -1,69 +1,5 @@
(comment) @comment
-[
- "."
- ","
- "|"
-] @punctuation.delimiter
-
-[
- "++"
- "+"
- "+."
- "-"
- "-."
- "*"
- "**"
- "*."
- "/."
- "<="
- "=="
- "==="
- "!"
- "!="
- "!=="
- ">="
- "&&"
- "||"
- "="
- ":="
- "->"
- "|>"
- ":>"
- "+="
- (uncurry)
-] @operator
-
-; Explicitly enclose these operators with binary_expression
-; to avoid confusion with JSX tag delimiters
-(binary_expression ["<" ">" "/"] @operator)
-
-[
- "("
- ")"
- "{"
- "}"
- "["
- "]"
-] @punctuation.bracket
-
-(polyvar_type
- [
- "["
- "[>"
- "[<"
- "]"
- ] @punctuation.bracket)
-
-[
- "~"
- "?"
- "=>"
- ".."
- "..."
-] @punctuation.special
-
-
; Identifiers
;------------
@@ -207,6 +143,69 @@
"while"
] @keyword.control.conditional
+[
+ "."
+ ","
+ "|"
+] @punctuation.delimiter
+
+[
+ "++"
+ "+"
+ "+."
+ "-"
+ "-."
+ "*"
+ "**"
+ "*."
+ "/."
+ "<="
+ "=="
+ "==="
+ "!"
+ "!="
+ "!=="
+ ">="
+ "&&"
+ "||"
+ "="
+ ":="
+ "->"
+ "|>"
+ ":>"
+ "+="
+ (uncurry)
+] @operator
+
+; Explicitly enclose these operators with binary_expression
+; to avoid confusion with JSX tag delimiters
+(binary_expression ["<" ">" "/"] @operator)
+
+[
+ "("
+ ")"
+ "{"
+ "}"
+ "["
+ "]"
+] @punctuation.bracket
+
+(polyvar_type
+ [
+ "["
+ "[>"
+ "[<"
+ "]"
+ ] @punctuation.bracket)
+
+[
+ "~"
+ "?"
+ "=>"
+ ".."
+ "..."
+] @punctuation.special
+
(ternary_expression ["?" ":"] @operator)
; JSX
@@ -219,3 +218,8 @@
(jsx_self_closing_element ["/" ">" "<"] @punctuation.special)
(jsx_fragment [">" "<" "/"] @punctuation.special)
(jsx_attribute (property_identifier) @attribute)
+
+; Error
+;----------
+
+(ERROR) @keyword.control.exception