@willbooster/tree-sitter-rust 3.1.2 → 3.1.3
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 +23 -1
- package/package.json +1 -1
- package/tree-sitter-rust.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -572,6 +572,7 @@ module.exports = grammar({
|
|
|
572
572
|
$._type_identifier,
|
|
573
573
|
$.scoped_type_identifier,
|
|
574
574
|
$.generic_type,
|
|
575
|
+
alias($._generic_type_turbofish, $.generic_type),
|
|
575
576
|
$.reference_type,
|
|
576
577
|
$.pointer_type,
|
|
577
578
|
$.tuple_type,
|
|
@@ -604,7 +605,8 @@ module.exports = grammar({
|
|
|
604
605
|
$._type_identifier,
|
|
605
606
|
alias(choice(...primitiveTypes), sym('type_identifier')),
|
|
606
607
|
$.scoped_type_identifier,
|
|
607
|
-
$.generic_type
|
|
608
|
+
$.generic_type,
|
|
609
|
+
alias($._generic_type_turbofish, $.generic_type)
|
|
608
610
|
)
|
|
609
611
|
),
|
|
610
612
|
'for'
|
|
@@ -767,6 +769,7 @@ module.exports = grammar({
|
|
|
767
769
|
$.metavariable,
|
|
768
770
|
$.pointer_type,
|
|
769
771
|
$.generic_type,
|
|
772
|
+
alias($._generic_type_turbofish, $.generic_type),
|
|
770
773
|
$.scoped_type_identifier,
|
|
771
774
|
$.tuple_type,
|
|
772
775
|
$.unit_type,
|
|
@@ -922,6 +925,7 @@ module.exports = grammar({
|
|
|
922
925
|
$.removed_trait_bound,
|
|
923
926
|
$.modified_trait_bound,
|
|
924
927
|
$.generic_type,
|
|
928
|
+
alias($._generic_type_turbofish, $.generic_type),
|
|
925
929
|
$.function_type,
|
|
926
930
|
$.tuple_type,
|
|
927
931
|
$.bounded_type
|
|
@@ -942,6 +946,7 @@ module.exports = grammar({
|
|
|
942
946
|
alias(choice(...primitiveTypes), sym('type_identifier')),
|
|
943
947
|
$.scoped_type_identifier,
|
|
944
948
|
$.generic_type,
|
|
949
|
+
alias($._generic_type_turbofish, $.generic_type),
|
|
945
950
|
$.function_type,
|
|
946
951
|
$.tuple_type
|
|
947
952
|
)
|
|
@@ -1636,6 +1641,23 @@ module.exports = grammar({
|
|
|
1636
1641
|
),
|
|
1637
1642
|
|
|
1638
1643
|
frontmatter_info_string: () => token.immediate(/[_\p{XID_Start}][_.\p{XID_Continue}-]*/u),
|
|
1644
|
+
_generic_type_turbofish: ($) =>
|
|
1645
|
+
prec(
|
|
1646
|
+
1,
|
|
1647
|
+
seq(
|
|
1648
|
+
field(
|
|
1649
|
+
'type',
|
|
1650
|
+
choice(
|
|
1651
|
+
$._type_identifier,
|
|
1652
|
+
alias(choice(...primitiveTypes), sym('type_identifier')),
|
|
1653
|
+
alias(choice(...reservedIdentifiers), $.identifier),
|
|
1654
|
+
$.scoped_type_identifier
|
|
1655
|
+
)
|
|
1656
|
+
),
|
|
1657
|
+
'::',
|
|
1658
|
+
field('type_arguments', $.type_arguments)
|
|
1659
|
+
)
|
|
1660
|
+
),
|
|
1639
1661
|
},
|
|
1640
1662
|
});
|
|
1641
1663
|
|
package/package.json
CHANGED
package/tree-sitter-rust.wasm
CHANGED
|
Binary file
|