@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 +3 -2
- package/package.json +1 -1
- package/tree-sitter-rust.wasm +0 -0
- package/tree-sitter.json +1 -1
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
package/tree-sitter-rust.wasm
CHANGED
|
Binary file
|