@willbooster/tree-sitter-rust 14.0.1 → 14.0.2

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/grammar.js CHANGED
@@ -155,6 +155,7 @@ module.exports = grammar({
155
155
  sym('_orphan_block_doc_comment_start'),
156
156
  sym('_orphan_doc_missing_owner'),
157
157
  sym('_trailing_type_bound_plus'),
158
+ sym('shebang'),
158
159
  ],
159
160
 
160
161
  supertypes: ($) => [
@@ -220,7 +221,7 @@ module.exports = grammar({
220
221
 
221
222
  rules: {
222
223
  source_file: ($) =>
223
- seq(sym('_frontmatter_context'), optional($.shebang), optional($.frontmatter), repeat($._statement)),
224
+ seq(sym('_frontmatter_context'), optional(sym('shebang')), optional($.frontmatter), repeat($._statement)),
224
225
 
225
226
  _statement: ($) => choice($.expression_statement, $._declaration_statement),
226
227
 
@@ -1870,9 +1871,6 @@ module.exports = grammar({
1870
1871
 
1871
1872
  identifier: () => /(r#)?[_\p{XID_Start}][_\p{XID_Continue}]*/u,
1872
1873
 
1873
- // oxlint-disable-next-line no-useless-escape -- tree-sitter's regex parser rejects an unescaped `[` in a character class.
1874
- shebang: () => /#![\r\f\t\v ]*([^\[\n].*)?\n/,
1875
-
1876
1874
  _reserved_identifier: ($) => alias(choice(...reservedIdentifiers, 'auto', 'macro_rules'), $.identifier),
1877
1875
 
1878
1876
  _type_identifier: ($) => alias(choice($.identifier, 'auto', 'macro_rules'), sym('type_identifier')),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "14.0.1",
3
+ "version": "14.0.2",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -25,7 +25,7 @@
25
25
  }
26
26
  ],
27
27
  "metadata": {
28
- "version": "14.0.1",
28
+ "version": "14.0.2",
29
29
  "license": "MIT",
30
30
  "description": "Rust grammar for tree-sitter",
31
31
  "authors": [