@willbooster/tree-sitter-rust 1.4.0 → 1.5.0

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
@@ -138,6 +138,7 @@ module.exports = grammar({
138
138
  ],
139
139
 
140
140
  conflicts: ($) => [
141
+ [$.const_item, $.function_modifiers],
141
142
  // Local ambiguity due to anonymous types:
142
143
  // See https://internals.rust-lang.org/t/pre-rfc-deprecating-anonymous-parameters/3710
143
144
  [$._type, $._pattern],
@@ -427,7 +428,7 @@ module.exports = grammar({
427
428
  seq(
428
429
  optional($.visibility_modifier),
429
430
  'const',
430
- field('name', $.identifier),
431
+ field('name', choice($.identifier, $._reserved_identifier)),
431
432
  ':',
432
433
  field('type', $._type),
433
434
  optional(seq('=', field('value', $._expression))),
@@ -491,7 +492,7 @@ module.exports = grammar({
491
492
  ';'
492
493
  ),
493
494
 
494
- function_modifiers: ($) => repeat1(choice('async', 'default', 'const', 'unsafe', $.extern_modifier)),
495
+ function_modifiers: ($) => repeat1(choice('async', 'default', 'const', 'unsafe', 'gen', $.extern_modifier)),
495
496
 
496
497
  where_clause: ($) => prec.right(seq('where', optional(seq(sepBy1(',', $.where_predicate), optional(','))))),
497
498
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -22,7 +22,7 @@
22
22
  }
23
23
  ],
24
24
  "metadata": {
25
- "version": "1.4.0",
25
+ "version": "1.5.0",
26
26
  "license": "MIT",
27
27
  "description": "Rust grammar for tree-sitter",
28
28
  "authors": [