@willbooster/tree-sitter-rust 13.0.0 → 13.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.
- package/grammar.js +11 -0
- package/package.json +1 -1
- package/tree-sitter-rust.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -154,6 +154,7 @@ module.exports = grammar({
|
|
|
154
154
|
sym('_orphan_line_doc_comment_start'),
|
|
155
155
|
sym('_orphan_block_doc_comment_start'),
|
|
156
156
|
sym('_orphan_doc_missing_owner'),
|
|
157
|
+
sym('_trailing_type_bound_plus'),
|
|
157
158
|
],
|
|
158
159
|
|
|
159
160
|
supertypes: ($) => [
|
|
@@ -193,6 +194,7 @@ module.exports = grammar({
|
|
|
193
194
|
// Local ambiguity due to anonymous types:
|
|
194
195
|
// See https://internals.rust-lang.org/t/pre-rfc-deprecating-anonymous-parameters/3710
|
|
195
196
|
[$._type, $._pattern],
|
|
197
|
+
[$._type, $._trailing_bounded_type],
|
|
196
198
|
[$.unit_type, $.tuple_pattern],
|
|
197
199
|
[$.scoped_identifier, $.scoped_type_identifier],
|
|
198
200
|
[$.parameters, $.tuple_struct_pattern],
|
|
@@ -660,6 +662,7 @@ module.exports = grammar({
|
|
|
660
662
|
$.function_type,
|
|
661
663
|
$.dynamic_type,
|
|
662
664
|
$.bounded_type,
|
|
665
|
+
alias($._trailing_bounded_type, $.bounded_type),
|
|
663
666
|
$.macro_invocation,
|
|
664
667
|
$.never_type,
|
|
665
668
|
$.array_type,
|
|
@@ -860,6 +863,7 @@ module.exports = grammar({
|
|
|
860
863
|
$.never_type,
|
|
861
864
|
$.dynamic_type,
|
|
862
865
|
$.bounded_type,
|
|
866
|
+
alias($._trailing_bounded_type, $.bounded_type),
|
|
863
867
|
$.removed_trait_bound,
|
|
864
868
|
$.modified_trait_bound,
|
|
865
869
|
alias(choice(...primitiveTypes), sym('primitive_type'))
|
|
@@ -962,6 +966,13 @@ module.exports = grammar({
|
|
|
962
966
|
)
|
|
963
967
|
),
|
|
964
968
|
|
|
969
|
+
_trailing_bounded_type: ($) =>
|
|
970
|
+
seq(
|
|
971
|
+
choice($.dynamic_type, $.abstract_type),
|
|
972
|
+
repeat(seq('+', choice($.lifetime, $._type, $.use_bounds, prec.dynamic(-2, $.higher_ranked_trait_bound)))),
|
|
973
|
+
alias(sym('_trailing_type_bound_plus'), '+')
|
|
974
|
+
),
|
|
975
|
+
|
|
965
976
|
use_bounds: ($) =>
|
|
966
977
|
seq('use', token(prec(1, '<')), sepBy(',', choice($.lifetime, $._type_identifier)), optional(','), '>'),
|
|
967
978
|
|
package/package.json
CHANGED
package/tree-sitter-rust.wasm
CHANGED
|
Binary file
|