tree-sitter-wasm 2.0.0 → 2.0.1

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.
Files changed (167) hide show
  1. package/index.d.ts +0 -8
  2. package/manifest.json +0 -51
  3. package/out/ada/tree-sitter-ada.wasm.sigstore.json +1 -1
  4. package/out/angular/tree-sitter-angular.wasm.sigstore.json +1 -1
  5. package/out/arduino/tree-sitter-arduino.wasm.sigstore.json +1 -1
  6. package/out/asm/tree-sitter-asm.wasm.sigstore.json +1 -1
  7. package/out/astro/tree-sitter-astro.wasm.sigstore.json +1 -1
  8. package/out/bash/tree-sitter-bash.wasm.sigstore.json +1 -1
  9. package/out/bibtex/tree-sitter-bibtex.wasm.sigstore.json +1 -1
  10. package/out/c/tree-sitter-c.wasm.sigstore.json +1 -1
  11. package/out/c_sharp/tree-sitter-c_sharp.wasm.sigstore.json +1 -1
  12. package/out/clojure/tree-sitter-clojure.wasm.sigstore.json +1 -1
  13. package/out/cmake/tree-sitter-cmake.wasm.sigstore.json +1 -1
  14. package/out/comment/tree-sitter-comment.wasm.sigstore.json +1 -1
  15. package/out/commonlisp/tree-sitter-commonlisp.wasm.sigstore.json +1 -1
  16. package/out/cpp/tree-sitter-cpp.wasm.sigstore.json +1 -1
  17. package/out/css/tree-sitter-css.wasm.sigstore.json +1 -1
  18. package/out/csv/tree-sitter-csv.wasm.sigstore.json +1 -1
  19. package/out/cuda/tree-sitter-cuda.wasm.sigstore.json +1 -1
  20. package/out/d/tree-sitter-d.wasm.sigstore.json +1 -1
  21. package/out/dart/tree-sitter-dart.wasm.sigstore.json +1 -1
  22. package/out/desktop/tree-sitter-desktop.wasm.sigstore.json +1 -1
  23. package/out/diff/tree-sitter-diff.wasm.sigstore.json +1 -1
  24. package/out/dockerfile/tree-sitter-dockerfile.wasm.sigstore.json +1 -1
  25. package/out/dtd/tree-sitter-dtd.wasm.sigstore.json +1 -1
  26. package/out/editorconfig/tree-sitter-editorconfig.wasm.sigstore.json +1 -1
  27. package/out/elisp/tree-sitter-elisp.wasm.sigstore.json +1 -1
  28. package/out/elixir/tree-sitter-elixir.wasm.sigstore.json +1 -1
  29. package/out/elm/tree-sitter-elm.wasm.sigstore.json +1 -1
  30. package/out/embedded_template/tree-sitter-embedded_template.wasm.sigstore.json +1 -1
  31. package/out/erlang/tree-sitter-erlang.wasm.sigstore.json +1 -1
  32. package/out/fortran/tree-sitter-fortran.wasm.sigstore.json +1 -1
  33. package/out/gdscript/tree-sitter-gdscript.wasm.sigstore.json +1 -1
  34. package/out/gdshader/tree-sitter-gdshader.wasm.sigstore.json +1 -1
  35. package/out/git_config/tree-sitter-git_config.wasm.sigstore.json +1 -1
  36. package/out/git_rebase/tree-sitter-git_rebase.wasm.sigstore.json +1 -1
  37. package/out/gitattributes/tree-sitter-gitattributes.wasm.sigstore.json +1 -1
  38. package/out/gitignore/tree-sitter-gitignore.wasm.sigstore.json +1 -1
  39. package/out/gleam/tree-sitter-gleam.wasm.sigstore.json +1 -1
  40. package/out/glsl/tree-sitter-glsl.wasm.sigstore.json +1 -1
  41. package/out/go/tree-sitter-go.wasm.sigstore.json +1 -1
  42. package/out/godot_resource/tree-sitter-godot_resource.wasm.sigstore.json +1 -1
  43. package/out/graphql/tree-sitter-graphql.wasm +0 -0
  44. package/out/graphql/tree-sitter-graphql.wasm.sigstore.json +1 -1
  45. package/out/groovy/tree-sitter-groovy.wasm.sigstore.json +1 -1
  46. package/out/haskell/tree-sitter-haskell.wasm.sigstore.json +1 -1
  47. package/out/hcl/tree-sitter-hcl.wasm.sigstore.json +1 -1
  48. package/out/html/tree-sitter-html.wasm.sigstore.json +1 -1
  49. package/out/ini/tree-sitter-ini.wasm.sigstore.json +1 -1
  50. package/out/java/tree-sitter-java.wasm.sigstore.json +1 -1
  51. package/out/javascript/tree-sitter-javascript.wasm.sigstore.json +1 -1
  52. package/out/json/tree-sitter-json.wasm.sigstore.json +1 -1
  53. package/out/julia/tree-sitter-julia.wasm.sigstore.json +1 -1
  54. package/out/just/tree-sitter-just.wasm.sigstore.json +1 -1
  55. package/out/kdl/tree-sitter-kdl.wasm.sigstore.json +1 -1
  56. package/out/kotlin/tree-sitter-kotlin.wasm.sigstore.json +1 -1
  57. package/out/latex/tree-sitter-latex.wasm.sigstore.json +1 -1
  58. package/out/liquid/tree-sitter-liquid.wasm.sigstore.json +1 -1
  59. package/out/lua/tree-sitter-lua.wasm.sigstore.json +1 -1
  60. package/out/make/tree-sitter-make.wasm.sigstore.json +1 -1
  61. package/out/markdown/tree-sitter-markdown.wasm.sigstore.json +1 -1
  62. package/out/markdown_inline/tree-sitter-markdown_inline.wasm.sigstore.json +1 -1
  63. package/out/matlab/tree-sitter-matlab.wasm +0 -0
  64. package/out/matlab/tree-sitter-matlab.wasm.sigstore.json +1 -1
  65. package/out/nginx/tree-sitter-nginx.wasm.sigstore.json +1 -1
  66. package/out/nim/tree-sitter-nim.wasm.sigstore.json +1 -1
  67. package/out/nix/tree-sitter-nix.wasm.sigstore.json +1 -1
  68. package/out/objc/tree-sitter-objc.wasm.sigstore.json +1 -1
  69. package/out/ocaml/highlights.scm +6 -2
  70. package/out/ocaml/tree-sitter-ocaml.wasm +0 -0
  71. package/out/ocaml/tree-sitter-ocaml.wasm.sigstore.json +1 -1
  72. package/out/ocaml_interface/highlights.scm +6 -2
  73. package/out/ocaml_interface/tree-sitter-ocaml_interface.wasm +0 -0
  74. package/out/ocaml_interface/tree-sitter-ocaml_interface.wasm.sigstore.json +1 -1
  75. package/out/ocaml_type/highlights.scm +6 -2
  76. package/out/ocaml_type/tree-sitter-ocaml_type.wasm +0 -0
  77. package/out/ocaml_type/tree-sitter-ocaml_type.wasm.sigstore.json +1 -1
  78. package/out/perl/tree-sitter-perl.wasm.sigstore.json +1 -1
  79. package/out/php/tree-sitter-php.wasm.sigstore.json +1 -1
  80. package/out/powershell/tree-sitter-powershell.wasm.sigstore.json +1 -1
  81. package/out/prisma/tree-sitter-prisma.wasm.sigstore.json +1 -1
  82. package/out/proto/tree-sitter-proto.wasm.sigstore.json +1 -1
  83. package/out/psv/tree-sitter-psv.wasm.sigstore.json +1 -1
  84. package/out/python/tree-sitter-python.wasm.sigstore.json +1 -1
  85. package/out/qmljs/tree-sitter-qmljs.wasm.sigstore.json +1 -1
  86. package/out/query/tree-sitter-query.wasm.sigstore.json +1 -1
  87. package/out/r/tree-sitter-r.wasm.sigstore.json +1 -1
  88. package/out/racket/tree-sitter-racket.wasm.sigstore.json +1 -1
  89. package/out/razor/tree-sitter-razor.wasm.sigstore.json +1 -1
  90. package/out/regex/tree-sitter-regex.wasm.sigstore.json +1 -1
  91. package/out/requirements/tree-sitter-requirements.wasm.sigstore.json +1 -1
  92. package/out/rescript/tree-sitter-rescript.wasm.sigstore.json +1 -1
  93. package/out/ruby/tree-sitter-ruby.wasm.sigstore.json +1 -1
  94. package/out/rust/tree-sitter-rust.wasm.sigstore.json +1 -1
  95. package/out/scala/tree-sitter-scala.wasm.sigstore.json +1 -1
  96. package/out/scheme/tree-sitter-scheme.wasm.sigstore.json +1 -1
  97. package/out/sln/tree-sitter-sln.wasm.sigstore.json +1 -1
  98. package/out/solidity/tree-sitter-solidity.wasm.sigstore.json +1 -1
  99. package/out/sql/tree-sitter-sql.wasm.sigstore.json +1 -1
  100. package/out/ssh_config/tree-sitter-ssh_config.wasm.sigstore.json +1 -1
  101. package/out/svelte/tree-sitter-svelte.wasm.sigstore.json +1 -1
  102. package/out/swift/tree-sitter-swift.wasm.sigstore.json +1 -1
  103. package/out/templ/tree-sitter-templ.wasm.sigstore.json +1 -1
  104. package/out/terraform/tree-sitter-terraform.wasm.sigstore.json +1 -1
  105. package/out/toml/tree-sitter-toml.wasm.sigstore.json +1 -1
  106. package/out/tsv/tree-sitter-tsv.wasm.sigstore.json +1 -1
  107. package/out/tsx/tree-sitter-tsx.wasm.sigstore.json +1 -1
  108. package/out/typescript/tree-sitter-typescript.wasm.sigstore.json +1 -1
  109. package/out/typst/tree-sitter-typst.wasm.sigstore.json +1 -1
  110. package/out/vim/tree-sitter-vim.wasm.sigstore.json +1 -1
  111. package/out/vimdoc/tree-sitter-vimdoc.wasm.sigstore.json +1 -1
  112. package/out/vue/tree-sitter-vue.wasm.sigstore.json +1 -1
  113. package/out/xml/tree-sitter-xml.wasm.sigstore.json +1 -1
  114. package/out/yaml/tree-sitter-yaml.wasm.sigstore.json +1 -1
  115. package/out/zig/tree-sitter-zig.wasm.sigstore.json +1 -1
  116. package/package.json +1 -1
  117. package/out/awk/highlights.scm +0 -122
  118. package/out/awk/injections.scm +0 -17
  119. package/out/awk/tree-sitter-awk.wasm +0 -0
  120. package/out/awk/tree-sitter-awk.wasm.sigstore.json +0 -1
  121. package/out/cairo/folds.scm +0 -26
  122. package/out/cairo/highlights.scm +0 -372
  123. package/out/cairo/indents.scm +0 -134
  124. package/out/cairo/injections.scm +0 -3
  125. package/out/cairo/locals.scm +0 -28
  126. package/out/cairo/textobjects.scm +0 -79
  127. package/out/cairo/tree-sitter-cairo.wasm +0 -0
  128. package/out/cairo/tree-sitter-cairo.wasm.sigstore.json +0 -1
  129. package/out/devicetree/folds.scm +0 -1
  130. package/out/devicetree/highlights.scm +0 -78
  131. package/out/devicetree/indents.scm +0 -12
  132. package/out/devicetree/injections.scm +0 -2
  133. package/out/devicetree/locals.scm +0 -4
  134. package/out/devicetree/tree-sitter-devicetree.wasm +0 -0
  135. package/out/devicetree/tree-sitter-devicetree.wasm.sigstore.json +0 -1
  136. package/out/fish/folds.scm +0 -8
  137. package/out/fish/highlights.scm +0 -66
  138. package/out/fish/indents.scm +0 -18
  139. package/out/fish/injections.scm +0 -2
  140. package/out/fish/locals.scm +0 -19
  141. package/out/fish/tree-sitter-fish.wasm +0 -0
  142. package/out/fish/tree-sitter-fish.wasm.sigstore.json +0 -1
  143. package/out/jq/highlights.scm +0 -158
  144. package/out/jq/injections.scm +0 -23
  145. package/out/jq/locals.scm +0 -10
  146. package/out/jq/tree-sitter-jq.wasm +0 -0
  147. package/out/jq/tree-sitter-jq.wasm.sigstore.json +0 -1
  148. package/out/php_only/folds.scm +0 -19
  149. package/out/php_only/highlights.scm +0 -203
  150. package/out/php_only/indents.scm +0 -68
  151. package/out/php_only/injections-text.scm +0 -3
  152. package/out/php_only/injections.scm +0 -10
  153. package/out/php_only/locals.scm +0 -84
  154. package/out/php_only/tags.scm +0 -40
  155. package/out/php_only/tree-sitter-php_only.wasm +0 -0
  156. package/out/php_only/tree-sitter-php_only.wasm.sigstore.json +0 -1
  157. package/out/scss/folds.scm +0 -1
  158. package/out/scss/highlights.scm +0 -69
  159. package/out/scss/indents.scm +0 -7
  160. package/out/scss/injections.scm +0 -2
  161. package/out/scss/tree-sitter-scss.wasm +0 -0
  162. package/out/scss/tree-sitter-scss.wasm.sigstore.json +0 -1
  163. package/out/systemverilog/folds.scm +0 -23
  164. package/out/systemverilog/highlights.scm +0 -325
  165. package/out/systemverilog/injections.scm +0 -8
  166. package/out/systemverilog/tree-sitter-systemverilog.wasm +0 -0
  167. package/out/systemverilog/tree-sitter-systemverilog.wasm.sigstore.json +0 -1
@@ -1,122 +0,0 @@
1
- ; tree-sitter-awk v0.7.2
2
-
3
- ; https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
4
-
5
- ; Order matters
6
-
7
- (ns_qualified_name (namespace) @namespace)
8
- (ns_qualified_name "::" @operator)
9
-
10
- (func_def name: (_ (identifier) @function) @function)
11
- (func_call name: (_ (identifier) @function) @function)
12
-
13
- [
14
- (identifier)
15
- (field_ref)
16
- ] @variable
17
- (field_ref (_) @variable)
18
-
19
- (string) @string
20
- (number) @number
21
- (regex) @regexp
22
- (comment) @comment
23
-
24
- [
25
- "function"
26
- "func"
27
- "print"
28
- "printf"
29
- "if"
30
- "else"
31
- "do"
32
- "while"
33
- "for"
34
- "in"
35
- "delete"
36
- "return"
37
- "exit"
38
- "switch"
39
- "case"
40
- "default"
41
- (break_statement)
42
- (continue_statement)
43
- (next_statement)
44
- (nextfile_statement)
45
- (getline_input)
46
- (getline_file)
47
- ] @keyword
48
-
49
- [
50
- "@include"
51
- "@load"
52
- "@namespace"
53
- (pattern)
54
- ] @namespace
55
-
56
- (binary_exp [
57
- "^"
58
- "**"
59
- "*"
60
- "/"
61
- "%"
62
- "+"
63
- "-"
64
- "<"
65
- ">"
66
- "<="
67
- ">="
68
- "=="
69
- "!="
70
- "~"
71
- "!~"
72
- "in"
73
- "&&"
74
- "||"
75
- ] @operator)
76
-
77
- (unary_exp [
78
- "!"
79
- "+"
80
- "-"
81
- ] @operator)
82
-
83
- (assignment_exp [
84
- "="
85
- "+="
86
- "-="
87
- "*="
88
- "/="
89
- "%="
90
- "^="
91
- ] @operator)
92
-
93
- (ternary_exp [
94
- "?"
95
- ":"
96
- ] @operator)
97
-
98
- (update_exp [
99
- "++"
100
- "--"
101
- ] @operator)
102
-
103
- (redirected_io_statement [
104
- ">"
105
- ">>"
106
- ] @operator)
107
-
108
- (piped_io_statement [
109
- "|"
110
- "|&"
111
- ] @operator)
112
-
113
- [
114
- ";"
115
- ","
116
- "("
117
- ")"
118
- "["
119
- "]"
120
- "{"
121
- "}"
122
- ] @operator
@@ -1,17 +0,0 @@
1
- ((comment) @injection.content
2
- (#set! injection.language "comment"))
3
-
4
- ((regex) @injection.content
5
- (#set! injection.language "regex"))
6
-
7
- ((print_statement
8
- (exp_list
9
- .
10
- (string) @injection.content))
11
- (#set! injection.language "printf"))
12
-
13
- ((printf_statement
14
- (exp_list
15
- .
16
- (string) @injection.content))
17
- (#set! injection.language "printf"))
Binary file
@@ -1 +0,0 @@
1
- {"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json", "verificationMaterial":{"certificate":{"rawBytes":"MIIHSDCCBs+gAwIBAgIUWhmQI+BU0hpHk1UJt923AcYaybAwCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYwOTEyMDIzMjA5WhcNMjYwOTE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qkKnzxgG8geB11JpdCl7UUAwCgYIKoZIzj0EAwMDZwAwZAIwO4gBctj+W0PAyyYamaQNCEyiZEtVX9DT4Pmp/4TlKXZ3vSDDmrjjlTj/8auhIY7PAjBZ1Oami655CMXZjhzpTpK/2v5O5HAvrWKbux8e0sNEihOufj5CA4cD4osIaVSxyXc="}, "tlogEntries":[{"logIndex":"2801613352", "logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="}, "kindVersion":{"kind":"hashedrekord", "version":"0.0.1"}, "integratedTime":"1789180330", "inclusionPromise":{"signedEntryTimestamp":"MEUCIBjENijizssb8fFlxNem2Geuw6i7axZWpzy4KhSrumtuAiEAsrNhHC7QIEcPsHsy0B7Smks9/gPUAN3UDGA9e6yuupA="}, "inclusionProof":{"logIndex":"2679709090", "rootHash":"XM0se3ilGZ6RvejmOAq1vbCiC0PDgXN0SXpasj7ziKk=", "treeSize":"2679709125", "hashes":["UETcKGc5As9WehrrIPnQkx9nVKv09080dPbYuKSOmVw=", "IGmAkiyrGdUwrdvc9hvov7noE7H1T4nxVBoeC7H25jQ=", "P9uqSnYGBsmzbNPmLIgYBVa74xg7xTudAS2Yl0bl7lk=", "o6qgXD0zclGM0vZ7NwSDtmK6e5ADk0G1bhCuMDELveQ=", "IpDBN1J+tKnYdVjtgTjapqIDyOYtbHl04GvME98nBC8=", "Bj1X1tQwFpKycArpNYRaDEeMHT4BKT/E82/xnlf9hjk=", "JODD4WcI9padD8kDvF5C5j+2t9hoWzFudkJHuhBZf00=", "gDor7sBvuX9lL/QKYK194jKEIoe0iPoY9WGXeEMCnnY=", "CWugNzOCF3XiED5ZepNkkDfSJrNxiVTQLXpJQPBW7eI=", "ZiR37g8MY28ztGTss7WlpfEdKAvNmbzQ9R8Dn7nLiug=", "IWFkmZbt1YLMxXNcOlKogpI23Jrdle/PiduM3gFzO1M=", "kMEOzEosH7zJg+xtAF1iJ/nW7MloQEYDubpyEo7+t7k=", "sJPJ2K18ORI/My/4AcRyV8pRta05hI2KiV4ZAYJ+E+Y=", "EAlX3sqw3nM9DEmaMJtqIncwrihQn3YknxZM4V2GH4s=", "KXxrv3cZeaG6VZ+v3iO1Hpg/NL2rILOPNcI7tQvgFtQ=", "FBvSTdTfnWE5REtJGKpM/HJw7ueWxtamyX2rgqLg06k=", "+vRifg0z2+f24kM77ydjtf62cQFqGfn92VfqWg1acZQ=", "Ari+W6zWoRpeR1Lw5lnM64DXE7cw7awR/QTfo7IO3PM=", "4SexKjDhe33uQFmbzX5SUsB0SyhTm14ObSvNGPpKDFk=", "7tD2K8mAqGTMENrP2YXWz71BeTWQPCiYd3CESAgQLz8=", "eXSLrLqKSxRTixSP/k4YimriB2lufao6trqTrsxxlyg=", "SndbMKVtcTenAkwi2JBfGzD+mhexp1qJbRIY+A1JRIU=", "xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="], "checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n2679709125\nXM0se3ilGZ6RvejmOAq1vbCiC0PDgXN0SXpasj7ziKk=\n\n— rekor.sigstore.dev wNI9ajBGAiEAmP8yZd55AkhyC3Byvj7AjPjhueBunNZwRvTrAirDevICIQC8wxd8uViZgHLYyhfAd66xtYCAd9xaG2Dq00FaMAUinw==\n"}}, "canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiI4MDRlOWFhNDE4MjkxYjY4ZThkZGRhMGM0MWNiYTI2YjA5ZjA4NjE0ZmVhMzMyNTYyYjNiOGJiYTgxNzQyZWRjIn19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FWUNJUUNhN2YwN2FiVUg5UkxpcXVLL0QzT3NkZHlkVkNuNHhXUjhoZzlROXJEa01BSWhBSUdSOXI4emg5T0xUcWx3MkVrNkNhU2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HPxxIorVGU3fjdPWSGzSxVkE6kCFbm0HMIGOBgsqhkiG9w0BCRACLzF/MH0wezB5BCCF+Se8B6tiysO0Q1bBDvyBssaIP9p6uebYcNnROs0FtzBVMD2kOzA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDAKBggqhkjOPQQDAgRoMGYCMQDx/FeDdwIh/+GbGlJrBsizk2va/9DDm0Tv84wUk67dYZ7edfRWh7Jr7hptT+Oz6g0CMQDjT5pqsX+/1UEBB2QZQgmhDsr9fT8gOQFIbOno2GFPYQ9g1Ycqr9wt9yHsB+28fTQ="}]}}, "messageSignature":{"messageDigest":{"algorithm":"SHA2_256", "digest":"gE6apBgpG2jo3doMQcuiawnwhhT+ozJWKzuLuoF0Ltw="}, "signature":"MEYCIQCa7f07abUH9RLiquK/D3OsddydVCn4xWR8hg9Q9rDkMAIhAIGR9r8zh9OLTqlw2Ek6CaSg6CWuDTlSQNMQOo8NqSFW"}}
@@ -1,26 +0,0 @@
1
- [
2
- (mod_item)
3
- (struct_item)
4
- (trait_item)
5
- (enum_item)
6
- (impl_item)
7
- (type_item)
8
- (use_declaration)
9
- (let_declaration)
10
- (namespace_definition)
11
- (arguments)
12
- (implicit_arguments)
13
- (tuple_type)
14
- (import_statement)
15
- (attribute_statement)
16
- (with_statement)
17
- (if_statement)
18
- (function_definition)
19
- (struct_definition)
20
- (loop_expression)
21
- (if_expression)
22
- (match_expression)
23
- (call_expression)
24
- (tuple_expression)
25
- (attribute_item)
26
- ] @fold
@@ -1,372 +0,0 @@
1
- ; -------
2
- ; Tree-Sitter doesn't allow overrides in regards to captures,
3
- ; though it is possible to affect the child node of a captured
4
- ; node. Thus, the approach here is to flip the order so that
5
- ; overrides are unnecessary.
6
- ; -------
7
-
8
- ; -------
9
- ; Types
10
- ; -------
11
-
12
- (type_parameters
13
- (type_identifier) @type.parameter)
14
- (constrained_type_parameter
15
- left: (type_identifier) @type.parameter)
16
-
17
- ; ---
18
- ; Primitives
19
- ; ---
20
-
21
- (primitive_type) @type.builtin
22
- (boolean_literal) @constant.builtin.boolean
23
- (numeric_literal) @constant.numeric.integer
24
- [
25
- (string_literal)
26
- (shortstring_literal)
27
- ] @string
28
- [
29
- (line_comment)
30
- ] @comment
31
-
32
- ; ---
33
- ; Extraneous
34
- ; ---
35
-
36
- (enum_variant (identifier) @type.enum.variant)
37
-
38
- (field_initializer
39
- (field_identifier) @variable.other.member)
40
- (shorthand_field_initializer
41
- (identifier) @variable.other.member)
42
- (shorthand_field_identifier) @variable.other.member
43
-
44
-
45
- ; ---
46
- ; Punctuation
47
- ; ---
48
-
49
- [
50
- "::"
51
- "."
52
- ";"
53
- ","
54
- ] @punctuation.delimiter
55
-
56
- [
57
- "("
58
- ")"
59
- "["
60
- "]"
61
- "{"
62
- "}"
63
- ] @punctuation.bracket
64
- (type_arguments
65
- [
66
- "<"
67
- ">"
68
- ] @punctuation.bracket)
69
- (type_parameters
70
- [
71
- "<"
72
- ">"
73
- ] @punctuation.bracket)
74
- (closure_parameters
75
- "|" @punctuation.bracket)
76
-
77
- ; ---
78
- ; Variables
79
- ; ---
80
-
81
- (let_declaration
82
- pattern: [
83
- ((identifier) @variable)
84
- ((tuple_pattern
85
- (identifier) @variable))
86
- ])
87
-
88
- ; It needs to be anonymous to not conflict with `call_expression` further below.
89
- (_
90
- value: (field_expression
91
- value: (identifier)? @variable
92
- field: (field_identifier) @variable.other.member))
93
-
94
- (parameter
95
- pattern: (identifier) @variable.parameter)
96
-
97
- (closure_parameters
98
- (identifier) @variable.parameter)
99
- ; -------
100
- ; Keywords
101
- ; -------
102
-
103
- (for_expression
104
- "for" @keyword.control.repeat)
105
-
106
- "in" @keyword.control
107
-
108
- [
109
- "match"
110
- "if"
111
- "else"
112
- ] @keyword.control.conditional
113
-
114
- [
115
- "while"
116
- "loop"
117
- ] @keyword.control.repeat
118
-
119
- [
120
- "break"
121
- "continue"
122
- "return"
123
- ] @keyword.control.return
124
-
125
- "use" @keyword.control.import
126
- (mod_item "mod" @keyword.control.import !body)
127
- (use_as_clause "as" @keyword.control.import)
128
-
129
-
130
- [
131
- (crate)
132
- (super)
133
- "as"
134
- "pub"
135
- "mod"
136
- (extern)
137
- (nopanic)
138
-
139
- "impl"
140
- "trait"
141
- "of"
142
-
143
- "default"
144
- ] @keyword
145
-
146
- [
147
- "struct"
148
- "enum"
149
- "type"
150
- ] @keyword.storage.type
151
-
152
- "let" @keyword.storage
153
- "fn" @keyword.function
154
-
155
- (mutable_specifier) @keyword.storage.modifier.mut
156
- (ref_specifier) @keyword.storage.modifier.ref
157
-
158
- (snapshot_type "@" @keyword.storage.modifier.ref)
159
-
160
- [
161
- "const"
162
- (ref_specifier)
163
- ] @keyword.storage.modifier
164
-
165
- ; TODO: variable.mut to highlight mutable identifiers via locals.scm
166
-
167
- ; -------
168
- ; Constructors
169
- ; -------
170
- ; TODO: this is largely guesswork, remove it once we get actual info from locals.scm or r-a
171
-
172
- (struct_expression
173
- name: (type_identifier) @constructor)
174
-
175
- (tuple_enum_pattern
176
- type: [
177
- (identifier) @constructor
178
- (scoped_identifier
179
- name: (identifier) @constructor)
180
- ])
181
- (struct_pattern
182
- type: [
183
- ((type_identifier) @constructor)
184
- (scoped_type_identifier
185
- name: (type_identifier) @constructor)
186
- ])
187
- (match_pattern
188
- ((identifier) @constructor) (#match? @constructor "^[A-Z]"))
189
- (or_pattern
190
- ((identifier) @constructor)
191
- ((identifier) @constructor)
192
- (#match? @constructor "^[A-Z]"))
193
-
194
- ; -------
195
- ; Guess Other Types
196
- ; -------
197
-
198
- ((identifier) @constant
199
- (#match? @constant "^[A-Z][A-Z\\d_]*$"))
200
-
201
- ; ---
202
- ; PascalCase identifiers in call_expressions (e.g. `Ok()`)
203
- ; are assumed to be enum constructors.
204
- ; ---
205
-
206
- (call_expression
207
- function: [
208
- ((identifier) @constructor
209
- (#match? @constructor "^[A-Z]"))
210
- (scoped_identifier
211
- name: ((identifier) @constructor
212
- (#match? @constructor "^[A-Z]")))
213
- ])
214
-
215
- ; ---
216
- ; PascalCase identifiers under a path which is also PascalCase
217
- ; are assumed to be constructors if they have methods or fields.
218
- ; ---
219
-
220
- (field_expression
221
- value: (scoped_identifier
222
- path: [
223
- (identifier) @type
224
- (scoped_identifier
225
- name: (identifier) @type)
226
- ]
227
- name: (identifier) @constructor
228
- (#match? @type "^[A-Z]")
229
- (#match? @constructor "^[A-Z]")))
230
-
231
- ; ---
232
- ; Other PascalCase identifiers are assumed to be structs.
233
- ; ---
234
-
235
- ((identifier) @type
236
- (#match? @type "^[A-Z]"))
237
-
238
- ; -------
239
- ; Functions
240
- ; -------
241
-
242
- (call_expression
243
- function: [
244
- ((identifier) @function)
245
- (scoped_identifier
246
- name: (identifier) @function)
247
- (field_expression
248
- field: (field_identifier) @function)
249
- ])
250
- (generic_function
251
- function: [
252
- ((identifier) @function)
253
- (scoped_identifier
254
- name: (identifier) @function)
255
- (field_expression
256
- field: (field_identifier) @function.method)
257
- ])
258
- (function_item
259
- (function
260
- name: (identifier) @function))
261
-
262
- (function_signature_item
263
- (function
264
- name: (identifier) @function))
265
-
266
- (external_function_item
267
- (function
268
- name: (identifier) @function))
269
-
270
- ; ---
271
- ; Macros
272
- ; ---
273
-
274
- (attribute
275
- (identifier) @special
276
- arguments: (token_tree (identifier) @type)
277
- (#eq? @special "derive")
278
- )
279
-
280
- (attribute
281
- (identifier) @function.macro)
282
- (attribute
283
- [
284
- (identifier) @function.macro
285
- (scoped_identifier
286
- name: (identifier) @function.macro)
287
- ]
288
- (token_tree (identifier) @function.macro)?)
289
-
290
- (inner_attribute_item) @attribute
291
-
292
- (macro_invocation
293
- macro: [
294
- ((identifier) @function.macro)
295
- (scoped_identifier
296
- name: (identifier) @function.macro)
297
- ]
298
- "!" @function.macro)
299
-
300
-
301
- ; -------
302
- ; Operators
303
- ; -------
304
-
305
- [
306
- "*"
307
- "->"
308
- "=>"
309
- "<="
310
- "="
311
- "=="
312
- "!"
313
- "!="
314
- "%"
315
- "%="
316
- "@"
317
- "&&"
318
- "|"
319
- "||"
320
- "^"
321
- "*"
322
- "*="
323
- "-"
324
- "-="
325
- "+"
326
- "+="
327
- "/"
328
- "/="
329
- ">"
330
- "<"
331
- ">="
332
- ">>"
333
- "<<"
334
- ] @operator
335
-
336
- ; -------
337
- ; Paths
338
- ; -------
339
-
340
- (use_declaration
341
- argument: (identifier) @namespace)
342
- (use_wildcard
343
- (identifier) @namespace)
344
- (mod_item
345
- name: (identifier) @namespace)
346
- (scoped_use_list
347
- path: (identifier)? @namespace)
348
- (use_list
349
- (identifier) @namespace)
350
- (use_as_clause
351
- path: (identifier)? @namespace
352
- alias: (identifier) @namespace)
353
-
354
- ; ---
355
- ; Remaining Paths
356
- ; ---
357
-
358
- (scoped_identifier
359
- path: (identifier)? @namespace
360
- name: (identifier) @namespace)
361
- (scoped_type_identifier
362
- path: (identifier) @namespace)
363
-
364
- ; -------
365
- ; Remaining Identifiers
366
- ; -------
367
-
368
- "?" @special
369
-
370
- (type_identifier) @type
371
- (identifier) @variable
372
- (field_identifier) @variable.other.member
@@ -1,134 +0,0 @@
1
- [
2
- (use_list)
3
- (block)
4
- (match_block)
5
- (arguments)
6
- (parameters)
7
- (declaration_list)
8
- (field_declaration_list)
9
- (field_initializer_list)
10
- (struct_pattern)
11
- (tuple_pattern)
12
- (unit_expression)
13
- (enum_variant_list)
14
- (call_expression)
15
- (binary_expression)
16
- (field_expression)
17
- (tuple_expression)
18
- (array_expression)
19
-
20
- (token_tree)
21
- ] @indent
22
-
23
- [
24
- "}"
25
- "]"
26
- ")"
27
- ] @outdent
28
-
29
- ; Indent the right side of assignments.
30
- ; The #not-same-line? predicate is required to prevent an extra indent for e.g.
31
- ; an else-clause where the previous if-clause starts on the same line as the assignment.
32
- (assignment_expression
33
- .
34
- (_) @expr-start
35
- right: (_) @indent
36
- (#not-same-line? @indent @expr-start)
37
- (#set! "scope" "all")
38
- )
39
- (compound_assignment_expr
40
- .
41
- (_) @expr-start
42
- right: (_) @indent
43
- (#not-same-line? @indent @expr-start)
44
- (#set! "scope" "all")
45
- )
46
- (let_declaration
47
- "let" @expr-start
48
- value: (_) @indent
49
- alternative: (_)? @indent
50
- (#not-same-line? @indent @expr-start)
51
- (#set! "scope" "all")
52
- )
53
- (let_condition
54
- .
55
- (_) @expr-start
56
- value: (_) @indent
57
- (#not-same-line? @indent @expr-start)
58
- (#set! "scope" "all")
59
- )
60
- (if_expression
61
- .
62
- (_) @expr-start
63
- condition: (_) @indent
64
- (#not-same-line? @indent @expr-start)
65
- (#set! "scope" "all")
66
- )
67
- (field_pattern
68
- .
69
- (_) @expr-start
70
- pattern: (_) @indent
71
- (#not-same-line? @indent @expr-start)
72
- (#set! "scope" "all")
73
- )
74
- ; Indent type aliases that span multiple lines, similar to
75
- ; regular assignment expressions
76
- (type_item
77
- .
78
- (_) @expr-start
79
- type: (_) @indent
80
- (#not-same-line? @indent @expr-start)
81
- (#set! "scope" "all")
82
- )
83
-
84
- ; Some field expressions where the left part is a multiline expression are not
85
- ; indented by cargo fmt.
86
- ; Because this multiline expression might be nested in an arbitrary number of
87
- ; field expressions, this can only be matched using a Regex.
88
- (field_expression
89
- value: (_) @val
90
- "." @outdent
91
- ; Check whether the first line ends with `(`, `{` or `[` (up to whitespace).
92
- (#match? @val "(\\A[^\\n\\r]+(\\(|\\{|\\[)[\\t ]*(\\n|\\r))")
93
- )
94
- ; Same as above, but with an additional `call_expression`. This is required since otherwise
95
- ; the arguments of the function call won't be outdented.
96
- (call_expression
97
- function: (field_expression
98
- value: (_) @val
99
- "." @outdent
100
- (#match? @val "(\\A[^\\n\\r]+(\\(|\\{|\\[)[\\t ]*(\\n|\\r))")
101
- )
102
- arguments: (_) @outdent
103
- )
104
-
105
-
106
- ; Indent if guards in patterns.
107
- ; Since the tree-sitter grammar doesn't create a node for the if expression,
108
- ; it's not possible to do this correctly in all cases. Indenting the tail of the
109
- ; whole pattern whenever it contains an `if` only fails if the `if` appears after
110
- ; the second line of the pattern (which should only rarely be the case)
111
- (match_pattern
112
- .
113
- (_) @expr-start
114
- "if" @pattern-guard
115
- (#not-same-line? @expr-start @pattern-guard)
116
- ) @indent
117
-
118
- ; Align closure parameters if they span more than one line
119
- (closure_parameters
120
- "|"
121
- .
122
- (_) @anchor
123
- (_) @expr-end
124
- .
125
- (#not-same-line? @anchor @expr-end)
126
- ) @align
127
-
128
- (for_expression
129
- "in" @in
130
- .
131
- (_) @indent
132
- (#not-same-line? @in @indent)
133
- (#set! "scope" "all")
134
- )
@@ -1,3 +0,0 @@
1
- ([(line_comment)] @injection.content
2
- (#set! injection.language "comment"))
3
-