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.scm | 127 |
1 files changed, 64 insertions, 63 deletions
diff --git a/runtime/queries/rescript/highlights.scm b/runtime/queries/rescript/highlights.scm index 51d37b87..cfb8a351 100644 --- a/runtime/queries/rescript/highlights.scm +++ b/runtime/queries/rescript/highlights.scm @@ -1,5 +1,69 @@ (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 ;------------ @@ -143,69 +207,6 @@ "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 |