@willbooster/tree-sitter-rust 3.1.3 → 3.1.5

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
@@ -120,7 +120,7 @@ const fieldIdentifierKeywords = [...reservedIdentifiers, ...primitiveTypes, 'aut
120
120
  module.exports = grammar({
121
121
  name: 'rust',
122
122
 
123
- extras: ($) => [/\s/, $.line_comment, $.block_comment],
123
+ extras: ($) => [/[\s\u0085\u200E\u200F\u2028\u2029]/, $.line_comment, $.block_comment],
124
124
 
125
125
  externals: () => [
126
126
  sym('string_content'),
@@ -757,7 +757,7 @@ module.exports = grammar({
757
757
  parameter: ($) =>
758
758
  seq(optional($.mutable_specifier), field('pattern', choice($._pattern, $.self)), ':', field('type', $._type)),
759
759
 
760
- extern_modifier: ($) => seq('extern', optional($.string_literal)),
760
+ extern_modifier: ($) => seq('extern', optional(choice($.string_literal, $.raw_string_literal))),
761
761
 
762
762
  visibility_modifier: ($) =>
763
763
  choice($.crate, seq('pub', optional(seq('(', choice($.self, $.super, $.crate, seq('in', $._path)), ')')))),
@@ -1668,7 +1668,7 @@ module.exports = grammar({
1668
1668
  */
1669
1669
  function macroRepetitionSeparator(start, content, end) {
1670
1670
  return choice(
1671
- /[^\s/+*?$"][^/+*?$"]*|\/(?:[^/*+*?$"][^/+*?$"]*)?|\$/,
1671
+ /[^\s\u0085\u200E\u200F\u2028\u2029/+*?$"][^/+*?$"]*|\/(?:[^/*+*?$"][^/+*?$"]*)?|\$/,
1672
1672
  /[bc]?"(?:[^"\\]|\\[\s\S])*"/,
1673
1673
  /b?'(?:\\(?:[^xu]|u[0-9a-fA-F]{4}|u\{[0-9a-fA-F][0-9a-fA-F_]*\}|x[0-9a-fA-F]{2})|[^\\'])'/,
1674
1674
  seq(start, content, end)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
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.3",
28
+ "version": "3.1.5",
29
29
  "license": "MIT",
30
30
  "description": "Rust grammar for tree-sitter",
31
31
  "authors": [