@kerebron/wasm 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/tree-sitter-css/highlights.scm +76 -0
- package/assets/tree-sitter-css/release.json +15 -0
- package/assets/tree-sitter-css/tree-sitter-css.wasm +0 -0
- package/assets/tree-sitter-diff/highlights.scm +49 -0
- package/assets/tree-sitter-diff/release.json +15 -0
- package/assets/tree-sitter-diff/tree-sitter-diff.wasm +0 -0
- package/assets/tree-sitter-html/highlights.scm +13 -0
- package/assets/tree-sitter-html/injections.scm +7 -0
- package/assets/tree-sitter-html/release.json +15 -0
- package/assets/tree-sitter-html/tree-sitter-html.wasm +0 -0
- package/assets/tree-sitter-java/highlights.scm +149 -0
- package/assets/tree-sitter-java/release.json +15 -0
- package/assets/tree-sitter-java/tags.scm +20 -0
- package/assets/tree-sitter-java/tree-sitter-java.wasm +0 -0
- package/assets/tree-sitter-javascript/highlights-jsx.scm +8 -0
- package/assets/tree-sitter-javascript/highlights-params.scm +12 -0
- package/assets/tree-sitter-javascript/highlights.scm +204 -0
- package/assets/tree-sitter-javascript/injections.scm +31 -0
- package/assets/tree-sitter-javascript/locals.scm +23 -0
- package/assets/tree-sitter-javascript/release.json +15 -0
- package/assets/tree-sitter-javascript/tags.scm +99 -0
- package/assets/tree-sitter-javascript/tree-sitter-javascript.wasm +0 -0
- package/assets/tree-sitter-json/highlights.scm +16 -0
- package/assets/tree-sitter-json/release.json +15 -0
- package/assets/tree-sitter-json/tree-sitter-json.wasm +0 -0
- package/assets/tree-sitter-markdown/highlights-inline.scm +37 -0
- package/assets/tree-sitter-markdown/highlights.scm +52 -0
- package/assets/tree-sitter-markdown/injections-inline.scm +2 -0
- package/assets/tree-sitter-markdown/injections.scm +14 -0
- package/assets/tree-sitter-markdown/release.json +15 -0
- package/assets/tree-sitter-markdown/tree-sitter-markdown.wasm +0 -0
- package/assets/tree-sitter-markdown/tree-sitter-markdown_inline.wasm +0 -0
- package/assets/tree-sitter-regex/highlights.scm +63 -0
- package/assets/tree-sitter-regex/release.json +15 -0
- package/assets/tree-sitter-regex/tree-sitter-regex.wasm +0 -0
- package/assets/tree-sitter-rust/highlights.scm +161 -0
- package/assets/tree-sitter-rust/injections.scm +9 -0
- package/assets/tree-sitter-rust/release.json +15 -0
- package/assets/tree-sitter-rust/tags.scm +60 -0
- package/assets/tree-sitter-rust/tree-sitter-rust.wasm +0 -0
- package/assets/tree-sitter-toml/highlights.scm +53 -0
- package/assets/tree-sitter-toml/release.json +15 -0
- package/assets/tree-sitter-toml/tree-sitter-toml.wasm +0 -0
- package/assets/tree-sitter-typescript/highlights.scm +35 -0
- package/assets/tree-sitter-typescript/locals.scm +2 -0
- package/assets/tree-sitter-typescript/release.json +20 -0
- package/assets/tree-sitter-typescript/tags.scm +23 -0
- package/assets/tree-sitter-typescript/tree-sitter-tsx.wasm +0 -0
- package/assets/tree-sitter-typescript/tree-sitter-typescript.wasm +0 -0
- package/assets/tree-sitter-xml/highlights-dtd.scm +129 -0
- package/assets/tree-sitter-xml/highlights.scm +168 -0
- package/assets/tree-sitter-xml/release.json +20 -0
- package/assets/tree-sitter-xml/tree-sitter-dtd.wasm +0 -0
- package/assets/tree-sitter-xml/tree-sitter-xml.wasm +0 -0
- package/assets/tree-sitter-yaml/highlights.scm +79 -0
- package/assets/tree-sitter-yaml/release.json +15 -0
- package/assets/tree-sitter-yaml/tree-sitter-yaml.wasm +0 -0
- package/esm/src/deno.js +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
(
|
|
2
|
+
(comment)* @doc
|
|
3
|
+
.
|
|
4
|
+
(method_definition
|
|
5
|
+
name: (property_identifier) @name) @definition.method
|
|
6
|
+
(#not-eq? @name "constructor")
|
|
7
|
+
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
|
8
|
+
(#select-adjacent! @doc @definition.method)
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
(
|
|
12
|
+
(comment)* @doc
|
|
13
|
+
.
|
|
14
|
+
[
|
|
15
|
+
(class
|
|
16
|
+
name: (_) @name)
|
|
17
|
+
(class_declaration
|
|
18
|
+
name: (_) @name)
|
|
19
|
+
] @definition.class
|
|
20
|
+
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
|
21
|
+
(#select-adjacent! @doc @definition.class)
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
(
|
|
25
|
+
(comment)* @doc
|
|
26
|
+
.
|
|
27
|
+
[
|
|
28
|
+
(function_expression
|
|
29
|
+
name: (identifier) @name)
|
|
30
|
+
(function_declaration
|
|
31
|
+
name: (identifier) @name)
|
|
32
|
+
(generator_function
|
|
33
|
+
name: (identifier) @name)
|
|
34
|
+
(generator_function_declaration
|
|
35
|
+
name: (identifier) @name)
|
|
36
|
+
] @definition.function
|
|
37
|
+
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
|
38
|
+
(#select-adjacent! @doc @definition.function)
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
(
|
|
42
|
+
(comment)* @doc
|
|
43
|
+
.
|
|
44
|
+
(lexical_declaration
|
|
45
|
+
(variable_declarator
|
|
46
|
+
name: (identifier) @name
|
|
47
|
+
value: [(arrow_function) (function_expression)]) @definition.function)
|
|
48
|
+
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
|
49
|
+
(#select-adjacent! @doc @definition.function)
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
(
|
|
53
|
+
(comment)* @doc
|
|
54
|
+
.
|
|
55
|
+
(variable_declaration
|
|
56
|
+
(variable_declarator
|
|
57
|
+
name: (identifier) @name
|
|
58
|
+
value: [(arrow_function) (function_expression)]) @definition.function)
|
|
59
|
+
(#strip! @doc "^[\\s\\*/]+|^[\\s\\*/]$")
|
|
60
|
+
(#select-adjacent! @doc @definition.function)
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
(assignment_expression
|
|
64
|
+
left: [
|
|
65
|
+
(identifier) @name
|
|
66
|
+
(member_expression
|
|
67
|
+
property: (property_identifier) @name)
|
|
68
|
+
]
|
|
69
|
+
right: [(arrow_function) (function_expression)]
|
|
70
|
+
) @definition.function
|
|
71
|
+
|
|
72
|
+
(pair
|
|
73
|
+
key: (property_identifier) @name
|
|
74
|
+
value: [(arrow_function) (function_expression)]) @definition.function
|
|
75
|
+
|
|
76
|
+
(
|
|
77
|
+
(call_expression
|
|
78
|
+
function: (identifier) @name) @reference.call
|
|
79
|
+
(#not-match? @name "^(require)$")
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
(call_expression
|
|
83
|
+
function: (member_expression
|
|
84
|
+
property: (property_identifier) @name)
|
|
85
|
+
arguments: (_) @reference.call)
|
|
86
|
+
|
|
87
|
+
(new_expression
|
|
88
|
+
constructor: (_) @name) @reference.class
|
|
89
|
+
|
|
90
|
+
(export_statement value: (assignment_expression left: (identifier) @name right: ([
|
|
91
|
+
(number)
|
|
92
|
+
(string)
|
|
93
|
+
(identifier)
|
|
94
|
+
(undefined)
|
|
95
|
+
(null)
|
|
96
|
+
(new_expression)
|
|
97
|
+
(binary_expression)
|
|
98
|
+
(call_expression)
|
|
99
|
+
]))) @definition.constant
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.24.8",
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "tree-sitter-json.tar.xz",
|
|
6
|
+
"url": "https://github.com/tree-sitter/tree-sitter-json/releases/download/v0.24.8/tree-sitter-json.tar.xz",
|
|
7
|
+
"size": 39335
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "tree-sitter-json.wasm",
|
|
11
|
+
"url": "https://github.com/tree-sitter/tree-sitter-json/releases/download/v0.24.8/tree-sitter-json.wasm",
|
|
12
|
+
"size": 5596
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
;; From nvim-treesitter/nvim-treesitter
|
|
2
|
+
[
|
|
3
|
+
(code_span)
|
|
4
|
+
(link_title)
|
|
5
|
+
] @text.literal
|
|
6
|
+
|
|
7
|
+
[
|
|
8
|
+
(emphasis_delimiter)
|
|
9
|
+
(code_span_delimiter)
|
|
10
|
+
] @punctuation.delimiter
|
|
11
|
+
|
|
12
|
+
(emphasis) @text.emphasis
|
|
13
|
+
|
|
14
|
+
(strong_emphasis) @text.strong
|
|
15
|
+
|
|
16
|
+
[
|
|
17
|
+
(link_destination)
|
|
18
|
+
(uri_autolink)
|
|
19
|
+
] @text.uri
|
|
20
|
+
|
|
21
|
+
[
|
|
22
|
+
(link_label)
|
|
23
|
+
(link_text)
|
|
24
|
+
(image_description)
|
|
25
|
+
] @text.reference
|
|
26
|
+
|
|
27
|
+
[
|
|
28
|
+
(backslash_escape)
|
|
29
|
+
(hard_line_break)
|
|
30
|
+
] @string.escape
|
|
31
|
+
|
|
32
|
+
(image ["!" "[" "]" "(" ")"] @punctuation.delimiter)
|
|
33
|
+
(inline_link ["[" "]" "(" ")"] @punctuation.delimiter)
|
|
34
|
+
(shortcut_link ["[" "]"] @punctuation.delimiter)
|
|
35
|
+
|
|
36
|
+
; NOTE: extension not enabled by default
|
|
37
|
+
; (wiki_link ["[" "|" "]"] @punctuation.delimiter)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
;From nvim-treesitter/nvim-treesitter
|
|
2
|
+
(atx_heading (inline) @text.title)
|
|
3
|
+
(setext_heading (paragraph) @text.title)
|
|
4
|
+
|
|
5
|
+
[
|
|
6
|
+
(atx_h1_marker)
|
|
7
|
+
(atx_h2_marker)
|
|
8
|
+
(atx_h3_marker)
|
|
9
|
+
(atx_h4_marker)
|
|
10
|
+
(atx_h5_marker)
|
|
11
|
+
(atx_h6_marker)
|
|
12
|
+
(setext_h1_underline)
|
|
13
|
+
(setext_h2_underline)
|
|
14
|
+
] @punctuation.special
|
|
15
|
+
|
|
16
|
+
[
|
|
17
|
+
(link_title)
|
|
18
|
+
(indented_code_block)
|
|
19
|
+
(fenced_code_block)
|
|
20
|
+
] @text.literal
|
|
21
|
+
|
|
22
|
+
[
|
|
23
|
+
(fenced_code_block_delimiter)
|
|
24
|
+
] @punctuation.delimiter
|
|
25
|
+
|
|
26
|
+
(code_fence_content) @none
|
|
27
|
+
|
|
28
|
+
[
|
|
29
|
+
(link_destination)
|
|
30
|
+
] @text.uri
|
|
31
|
+
|
|
32
|
+
[
|
|
33
|
+
(link_label)
|
|
34
|
+
] @text.reference
|
|
35
|
+
|
|
36
|
+
[
|
|
37
|
+
(list_marker_plus)
|
|
38
|
+
(list_marker_minus)
|
|
39
|
+
(list_marker_star)
|
|
40
|
+
(list_marker_dot)
|
|
41
|
+
(list_marker_parenthesis)
|
|
42
|
+
(thematic_break)
|
|
43
|
+
] @punctuation.special
|
|
44
|
+
|
|
45
|
+
[
|
|
46
|
+
(block_continuation)
|
|
47
|
+
(block_quote_marker)
|
|
48
|
+
] @punctuation.special
|
|
49
|
+
|
|
50
|
+
[
|
|
51
|
+
(backslash_escape)
|
|
52
|
+
] @string.escape
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(fenced_code_block
|
|
2
|
+
(info_string
|
|
3
|
+
(language) @injection.language)
|
|
4
|
+
(code_fence_content) @injection.content)
|
|
5
|
+
|
|
6
|
+
((html_block) @injection.content (#set! injection.language "html"))
|
|
7
|
+
|
|
8
|
+
(document . (section . (thematic_break) (_) @injection.content (thematic_break)) (#set! injection.language "yaml"))
|
|
9
|
+
|
|
10
|
+
((minus_metadata) @injection.content (#set! injection.language "yaml"))
|
|
11
|
+
|
|
12
|
+
((plus_metadata) @injection.content (#set! injection.language "toml"))
|
|
13
|
+
|
|
14
|
+
((inline) @injection.content (#set! injection.language "markdown_inline"))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.5.1",
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "tree-sitter-markdown.wasm",
|
|
6
|
+
"url": "https://github.com/tree-sitter-grammars/tree-sitter-markdown/releases/download/v0.5.1/tree-sitter-markdown.wasm",
|
|
7
|
+
"size": 421534
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "tree-sitter-markdown_inline.wasm",
|
|
11
|
+
"url": "https://github.com/tree-sitter-grammars/tree-sitter-markdown/releases/download/v0.5.1/tree-sitter-markdown_inline.wasm",
|
|
12
|
+
"size": 426020
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
[
|
|
2
|
+
"("
|
|
3
|
+
")"
|
|
4
|
+
"(?"
|
|
5
|
+
"(?:"
|
|
6
|
+
"(?<"
|
|
7
|
+
"(?P<"
|
|
8
|
+
"(?P="
|
|
9
|
+
">"
|
|
10
|
+
"["
|
|
11
|
+
"]"
|
|
12
|
+
"{"
|
|
13
|
+
"}"
|
|
14
|
+
"[:"
|
|
15
|
+
":]"
|
|
16
|
+
] @punctuation.bracket
|
|
17
|
+
|
|
18
|
+
(group_name) @property
|
|
19
|
+
|
|
20
|
+
[
|
|
21
|
+
(identity_escape)
|
|
22
|
+
(control_letter_escape)
|
|
23
|
+
(character_class_escape)
|
|
24
|
+
(control_escape)
|
|
25
|
+
(start_assertion)
|
|
26
|
+
(end_assertion)
|
|
27
|
+
(boundary_assertion)
|
|
28
|
+
(non_boundary_assertion)
|
|
29
|
+
] @escape
|
|
30
|
+
|
|
31
|
+
[
|
|
32
|
+
"*"
|
|
33
|
+
"+"
|
|
34
|
+
"?"
|
|
35
|
+
"|"
|
|
36
|
+
"="
|
|
37
|
+
"!"
|
|
38
|
+
] @operator
|
|
39
|
+
|
|
40
|
+
(count_quantifier
|
|
41
|
+
[
|
|
42
|
+
(decimal_digits) @number
|
|
43
|
+
"," @punctuation.delimiter
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
(inline_flags_group
|
|
47
|
+
"-"? @operator
|
|
48
|
+
":"? @punctuation.delimiter)
|
|
49
|
+
|
|
50
|
+
(flags) @character.special
|
|
51
|
+
|
|
52
|
+
(character_class
|
|
53
|
+
[
|
|
54
|
+
"^" @operator
|
|
55
|
+
(class_range "-" @operator)
|
|
56
|
+
])
|
|
57
|
+
|
|
58
|
+
[
|
|
59
|
+
(class_character)
|
|
60
|
+
(posix_class_name)
|
|
61
|
+
] @constant.character
|
|
62
|
+
|
|
63
|
+
(pattern_character) @string
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.25.0",
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "tree-sitter-regex.tar.gz",
|
|
6
|
+
"url": "https://github.com/tree-sitter/tree-sitter-regex/releases/download/v0.25.0/tree-sitter-regex.tar.gz",
|
|
7
|
+
"size": 53456
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "tree-sitter-regex.wasm",
|
|
11
|
+
"url": "https://github.com/tree-sitter/tree-sitter-regex/releases/download/v0.25.0/tree-sitter-regex.wasm",
|
|
12
|
+
"size": 21162
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
; Identifiers
|
|
2
|
+
|
|
3
|
+
(type_identifier) @type
|
|
4
|
+
(primitive_type) @type.builtin
|
|
5
|
+
(field_identifier) @property
|
|
6
|
+
|
|
7
|
+
; Identifier conventions
|
|
8
|
+
|
|
9
|
+
; Assume all-caps names are constants
|
|
10
|
+
((identifier) @constant
|
|
11
|
+
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
|
12
|
+
|
|
13
|
+
; Assume uppercase names are enum constructors
|
|
14
|
+
((identifier) @constructor
|
|
15
|
+
(#match? @constructor "^[A-Z]"))
|
|
16
|
+
|
|
17
|
+
; Assume that uppercase names in paths are types
|
|
18
|
+
((scoped_identifier
|
|
19
|
+
path: (identifier) @type)
|
|
20
|
+
(#match? @type "^[A-Z]"))
|
|
21
|
+
((scoped_identifier
|
|
22
|
+
path: (scoped_identifier
|
|
23
|
+
name: (identifier) @type))
|
|
24
|
+
(#match? @type "^[A-Z]"))
|
|
25
|
+
((scoped_type_identifier
|
|
26
|
+
path: (identifier) @type)
|
|
27
|
+
(#match? @type "^[A-Z]"))
|
|
28
|
+
((scoped_type_identifier
|
|
29
|
+
path: (scoped_identifier
|
|
30
|
+
name: (identifier) @type))
|
|
31
|
+
(#match? @type "^[A-Z]"))
|
|
32
|
+
|
|
33
|
+
; Assume all qualified names in struct patterns are enum constructors. (They're
|
|
34
|
+
; either that, or struct names; highlighting both as constructors seems to be
|
|
35
|
+
; the less glaring choice of error, visually.)
|
|
36
|
+
(struct_pattern
|
|
37
|
+
type: (scoped_type_identifier
|
|
38
|
+
name: (type_identifier) @constructor))
|
|
39
|
+
|
|
40
|
+
; Function calls
|
|
41
|
+
|
|
42
|
+
(call_expression
|
|
43
|
+
function: (identifier) @function)
|
|
44
|
+
(call_expression
|
|
45
|
+
function: (field_expression
|
|
46
|
+
field: (field_identifier) @function.method))
|
|
47
|
+
(call_expression
|
|
48
|
+
function: (scoped_identifier
|
|
49
|
+
"::"
|
|
50
|
+
name: (identifier) @function))
|
|
51
|
+
|
|
52
|
+
(generic_function
|
|
53
|
+
function: (identifier) @function)
|
|
54
|
+
(generic_function
|
|
55
|
+
function: (scoped_identifier
|
|
56
|
+
name: (identifier) @function))
|
|
57
|
+
(generic_function
|
|
58
|
+
function: (field_expression
|
|
59
|
+
field: (field_identifier) @function.method))
|
|
60
|
+
|
|
61
|
+
(macro_invocation
|
|
62
|
+
macro: (identifier) @function.macro
|
|
63
|
+
"!" @function.macro)
|
|
64
|
+
|
|
65
|
+
; Function definitions
|
|
66
|
+
|
|
67
|
+
(function_item (identifier) @function)
|
|
68
|
+
(function_signature_item (identifier) @function)
|
|
69
|
+
|
|
70
|
+
(line_comment) @comment
|
|
71
|
+
(block_comment) @comment
|
|
72
|
+
|
|
73
|
+
(line_comment (doc_comment)) @comment.documentation
|
|
74
|
+
(block_comment (doc_comment)) @comment.documentation
|
|
75
|
+
|
|
76
|
+
"(" @punctuation.bracket
|
|
77
|
+
")" @punctuation.bracket
|
|
78
|
+
"[" @punctuation.bracket
|
|
79
|
+
"]" @punctuation.bracket
|
|
80
|
+
"{" @punctuation.bracket
|
|
81
|
+
"}" @punctuation.bracket
|
|
82
|
+
|
|
83
|
+
(type_arguments
|
|
84
|
+
"<" @punctuation.bracket
|
|
85
|
+
">" @punctuation.bracket)
|
|
86
|
+
(type_parameters
|
|
87
|
+
"<" @punctuation.bracket
|
|
88
|
+
">" @punctuation.bracket)
|
|
89
|
+
|
|
90
|
+
"::" @punctuation.delimiter
|
|
91
|
+
":" @punctuation.delimiter
|
|
92
|
+
"." @punctuation.delimiter
|
|
93
|
+
"," @punctuation.delimiter
|
|
94
|
+
";" @punctuation.delimiter
|
|
95
|
+
|
|
96
|
+
(parameter (identifier) @variable.parameter)
|
|
97
|
+
|
|
98
|
+
(lifetime (identifier) @label)
|
|
99
|
+
|
|
100
|
+
"as" @keyword
|
|
101
|
+
"async" @keyword
|
|
102
|
+
"await" @keyword
|
|
103
|
+
"break" @keyword
|
|
104
|
+
"const" @keyword
|
|
105
|
+
"continue" @keyword
|
|
106
|
+
"default" @keyword
|
|
107
|
+
"dyn" @keyword
|
|
108
|
+
"else" @keyword
|
|
109
|
+
"enum" @keyword
|
|
110
|
+
"extern" @keyword
|
|
111
|
+
"fn" @keyword
|
|
112
|
+
"for" @keyword
|
|
113
|
+
"gen" @keyword
|
|
114
|
+
"if" @keyword
|
|
115
|
+
"impl" @keyword
|
|
116
|
+
"in" @keyword
|
|
117
|
+
"let" @keyword
|
|
118
|
+
"loop" @keyword
|
|
119
|
+
"macro_rules!" @keyword
|
|
120
|
+
"match" @keyword
|
|
121
|
+
"mod" @keyword
|
|
122
|
+
"move" @keyword
|
|
123
|
+
"pub" @keyword
|
|
124
|
+
"raw" @keyword
|
|
125
|
+
"ref" @keyword
|
|
126
|
+
"return" @keyword
|
|
127
|
+
"static" @keyword
|
|
128
|
+
"struct" @keyword
|
|
129
|
+
"trait" @keyword
|
|
130
|
+
"type" @keyword
|
|
131
|
+
"union" @keyword
|
|
132
|
+
"unsafe" @keyword
|
|
133
|
+
"use" @keyword
|
|
134
|
+
"where" @keyword
|
|
135
|
+
"while" @keyword
|
|
136
|
+
"yield" @keyword
|
|
137
|
+
(crate) @keyword
|
|
138
|
+
(mutable_specifier) @keyword
|
|
139
|
+
(use_list (self) @keyword)
|
|
140
|
+
(scoped_use_list (self) @keyword)
|
|
141
|
+
(scoped_identifier (self) @keyword)
|
|
142
|
+
(super) @keyword
|
|
143
|
+
|
|
144
|
+
(self) @variable.builtin
|
|
145
|
+
|
|
146
|
+
(char_literal) @string
|
|
147
|
+
(string_literal) @string
|
|
148
|
+
(raw_string_literal) @string
|
|
149
|
+
|
|
150
|
+
(boolean_literal) @constant.builtin
|
|
151
|
+
(integer_literal) @constant.builtin
|
|
152
|
+
(float_literal) @constant.builtin
|
|
153
|
+
|
|
154
|
+
(escape_sequence) @escape
|
|
155
|
+
|
|
156
|
+
(attribute_item) @attribute
|
|
157
|
+
(inner_attribute_item) @attribute
|
|
158
|
+
|
|
159
|
+
"*" @operator
|
|
160
|
+
"&" @operator
|
|
161
|
+
"'" @operator
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.24.0",
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "tree-sitter-rust.tar.gz",
|
|
6
|
+
"url": "https://github.com/tree-sitter/tree-sitter-rust/releases/download/v0.24.0/tree-sitter-rust.tar.gz",
|
|
7
|
+
"size": 461750
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "tree-sitter-rust.wasm",
|
|
11
|
+
"url": "https://github.com/tree-sitter/tree-sitter-rust/releases/download/v0.24.0/tree-sitter-rust.wasm",
|
|
12
|
+
"size": 1111756
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
; ADT definitions
|
|
2
|
+
|
|
3
|
+
(struct_item
|
|
4
|
+
name: (type_identifier) @name) @definition.class
|
|
5
|
+
|
|
6
|
+
(enum_item
|
|
7
|
+
name: (type_identifier) @name) @definition.class
|
|
8
|
+
|
|
9
|
+
(union_item
|
|
10
|
+
name: (type_identifier) @name) @definition.class
|
|
11
|
+
|
|
12
|
+
; type aliases
|
|
13
|
+
|
|
14
|
+
(type_item
|
|
15
|
+
name: (type_identifier) @name) @definition.class
|
|
16
|
+
|
|
17
|
+
; method definitions
|
|
18
|
+
|
|
19
|
+
(declaration_list
|
|
20
|
+
(function_item
|
|
21
|
+
name: (identifier) @name) @definition.method)
|
|
22
|
+
|
|
23
|
+
; function definitions
|
|
24
|
+
|
|
25
|
+
(function_item
|
|
26
|
+
name: (identifier) @name) @definition.function
|
|
27
|
+
|
|
28
|
+
; trait definitions
|
|
29
|
+
(trait_item
|
|
30
|
+
name: (type_identifier) @name) @definition.interface
|
|
31
|
+
|
|
32
|
+
; module definitions
|
|
33
|
+
(mod_item
|
|
34
|
+
name: (identifier) @name) @definition.module
|
|
35
|
+
|
|
36
|
+
; macro definitions
|
|
37
|
+
|
|
38
|
+
(macro_definition
|
|
39
|
+
name: (identifier) @name) @definition.macro
|
|
40
|
+
|
|
41
|
+
; references
|
|
42
|
+
|
|
43
|
+
(call_expression
|
|
44
|
+
function: (identifier) @name) @reference.call
|
|
45
|
+
|
|
46
|
+
(call_expression
|
|
47
|
+
function: (field_expression
|
|
48
|
+
field: (field_identifier) @name)) @reference.call
|
|
49
|
+
|
|
50
|
+
(macro_invocation
|
|
51
|
+
macro: (identifier) @name) @reference.call
|
|
52
|
+
|
|
53
|
+
; implementations
|
|
54
|
+
|
|
55
|
+
(impl_item
|
|
56
|
+
trait: (type_identifier) @name) @reference.implementation
|
|
57
|
+
|
|
58
|
+
(impl_item
|
|
59
|
+
type: (type_identifier) @name
|
|
60
|
+
!trait) @reference.implementation
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
; Properties
|
|
2
|
+
;-----------
|
|
3
|
+
|
|
4
|
+
(bare_key) @type
|
|
5
|
+
|
|
6
|
+
(quoted_key) @string
|
|
7
|
+
|
|
8
|
+
(pair
|
|
9
|
+
(bare_key)) @property
|
|
10
|
+
|
|
11
|
+
(pair
|
|
12
|
+
(dotted_key
|
|
13
|
+
(bare_key) @property))
|
|
14
|
+
|
|
15
|
+
; Literals
|
|
16
|
+
;---------
|
|
17
|
+
|
|
18
|
+
(boolean) @boolean
|
|
19
|
+
|
|
20
|
+
(comment) @comment
|
|
21
|
+
|
|
22
|
+
(string) @string
|
|
23
|
+
|
|
24
|
+
[
|
|
25
|
+
(integer)
|
|
26
|
+
(float)
|
|
27
|
+
] @number
|
|
28
|
+
|
|
29
|
+
[
|
|
30
|
+
(offset_date_time)
|
|
31
|
+
(local_date_time)
|
|
32
|
+
(local_date)
|
|
33
|
+
(local_time)
|
|
34
|
+
] @string.special
|
|
35
|
+
|
|
36
|
+
; Punctuation
|
|
37
|
+
;------------
|
|
38
|
+
|
|
39
|
+
[
|
|
40
|
+
"."
|
|
41
|
+
","
|
|
42
|
+
] @punctuation.delimiter
|
|
43
|
+
|
|
44
|
+
"=" @operator
|
|
45
|
+
|
|
46
|
+
[
|
|
47
|
+
"["
|
|
48
|
+
"]"
|
|
49
|
+
"[["
|
|
50
|
+
"]]"
|
|
51
|
+
"{"
|
|
52
|
+
"}"
|
|
53
|
+
] @punctuation.bracket
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v0.7.0",
|
|
3
|
+
"assets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "tree-sitter-toml.tar.xz",
|
|
6
|
+
"url": "https://github.com/tree-sitter-grammars/tree-sitter-toml/releases/download/v0.7.0/tree-sitter-toml.tar.xz",
|
|
7
|
+
"size": 41492
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "tree-sitter-toml.wasm",
|
|
11
|
+
"url": "https://github.com/tree-sitter-grammars/tree-sitter-toml/releases/download/v0.7.0/tree-sitter-toml.wasm",
|
|
12
|
+
"size": 24040
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
Binary file
|