@willbooster/tree-sitter-rust 3.1.2 → 3.1.4

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
@@ -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'
@@ -755,7 +757,7 @@ module.exports = grammar({
755
757
  parameter: ($) =>
756
758
  seq(optional($.mutable_specifier), field('pattern', choice($._pattern, $.self)), ':', field('type', $._type)),
757
759
 
758
- extern_modifier: ($) => seq('extern', optional($.string_literal)),
760
+ extern_modifier: ($) => seq('extern', optional(choice($.string_literal, $.raw_string_literal))),
759
761
 
760
762
  visibility_modifier: ($) =>
761
763
  choice($.crate, seq('pub', optional(seq('(', choice($.self, $.super, $.crate, seq('in', $._path)), ')')))),
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -1847,6 +1847,10 @@
1847
1847
  "multiple": false,
1848
1848
  "required": false,
1849
1849
  "types": [
1850
+ {
1851
+ "type": "raw_string_literal",
1852
+ "named": true
1853
+ },
1850
1854
  {
1851
1855
  "type": "string_literal",
1852
1856
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -25,7 +25,7 @@
25
25
  }
26
26
  ],
27
27
  "metadata": {
28
- "version": "3.1.2",
28
+ "version": "3.1.4",
29
29
  "license": "MIT",
30
30
  "description": "Rust grammar for tree-sitter",
31
31
  "authors": [