File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ language = "ReScript"
1212
1313[grammars .rescript ]
1414repository = " https://github.com/rescript-lang/tree-sitter-rescript"
15- commit = " 64249e68649c77d3c880e335469b464674ad1cbf "
15+ commit = " 5b90cd4e4138b1231a67977303bda47eb608480a "
Original file line number Diff line number Diff line change 1- (comment) @comment
1+ [
2+ (line_comment)
3+ (block_comment)
4+ ] @comment
25
36; Identifiers
47;------------
1720 (list_pattern)
1821] @type
1922
23+ ; Dict
24+ (dict "dict" @type.builtin )
25+ (dict_pattern "dict" @type.builtin )
26+ (dict_entry (string) @property )
27+ (dict_pattern_entry (string) @property )
28+ (dict_pattern_entry (value_identifier) @variable.parameter )
29+ (parameter (dict_pattern (dict_pattern_entry (value_identifier) @variable.parameter )))
30+
2031((type_identifier) @type.builtin
2132 (#any-of? @type.builtin
2233 "int" "char" "string" "float" "bool" "unit"))
6576] @string
6677
6778
79+ (regex) @string.special
80+
6881(character) @character
6982(escape_sequence) @string.escape
7083
215228 "**"
216229 "*."
217230 "/."
231+ "<<"
232+ ">>"
233+ ">>>"
218234 "<="
219235 "=="
220236 "==="
221237 "!"
222238 "!="
223239 "!=="
224240 ">="
241+ "&&&"
225242 "&&"
243+ "|||"
226244 "||"
245+ "^^^"
246+ "~~~"
227247 "="
228248 ":="
229249 "->"
235255] @operator
236256
237257; Explicitly enclose these operators with binary_expression
238- ; to avoid confusion with JSX tag delimiters
239- (binary_expression ["<" ">" "/"] @operator )
258+ ; to avoid confusion with JSX tag delimiters and extension expressions.
259+ (binary_expression ["<" ">" "/" "%" ] @operator )
240260
241261[
242262 "("
Original file line number Diff line number Diff line change 1- ((comment) @injection.content (#set! injection.language "comment"))
1+ ([
2+ (line_comment)
3+ (block_comment)
4+ ] @injection.content (#set! injection.language "comment"))
5+
6+ ; regex literal
7+ (regex
8+ (regex_pattern) @injection.content (#set! injection.language "regex"))
29
310; %re
411(extension_expression
Original file line number Diff line number Diff line change 2424; Comments
2525;---------
2626
27- (comment) @comment.around
27+ ([
28+ (line_comment)
29+ (block_comment)
30+ ] @comment.around
2831
2932; Parameters
3033;-----------
You can’t perform that action at this time.
0 commit comments