@willbooster/tree-sitter-rust 3.0.2 → 3.0.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 CHANGED
@@ -1508,14 +1508,19 @@ module.exports = grammar({
1508
1508
  optional('b'),
1509
1509
  "'",
1510
1510
  optional(
1511
- choice(seq('\\', choice(/[^xu]/, /u[0-9a-fA-F]{4}/, /u\{[0-9a-fA-F]+\}/, /x[0-9a-fA-F]{2}/)), /[^\\']/)
1511
+ choice(
1512
+ seq('\\', choice(/[^xu]/, /u[0-9a-fA-F]{4}/, /u\{[0-9a-fA-F][0-9a-fA-F_]*\}/, /x[0-9a-fA-F]{2}/)),
1513
+ /[^\\']/
1514
+ )
1512
1515
  ),
1513
1516
  "'"
1514
1517
  )
1515
1518
  ),
1516
1519
 
1517
1520
  escape_sequence: () =>
1518
- token.immediate(seq('\\', choice(/[^xu]/, /u[0-9a-fA-F]{4}/, /u\{[0-9a-fA-F]+\}/, /x[0-9a-fA-F]{2}/))),
1521
+ token.immediate(
1522
+ seq('\\', choice(/[^xu]/, /u[0-9a-fA-F]{4}/, /u\{[0-9a-fA-F][0-9a-fA-F_]*\}/, /x[0-9a-fA-F]{2}/))
1523
+ ),
1519
1524
 
1520
1525
  boolean_literal: () => choice('true', 'false'),
1521
1526
 
@@ -1603,7 +1608,7 @@ function macroRepetitionSeparator(start, content, end) {
1603
1608
  return choice(
1604
1609
  /[^\s/+*?$"][^/+*?$"]*|\/(?:[^/*+*?$"][^/+*?$"]*)?|\$/,
1605
1610
  /[bc]?"(?:[^"\\]|\\[\s\S])*"/,
1606
- /b?'(?:\\(?:[^xu]|u[0-9a-fA-F]{4}|u\{[0-9a-fA-F]+\}|x[0-9a-fA-F]{2})|[^\\'])'/,
1611
+ /b?'(?:\\(?:[^xu]|u[0-9a-fA-F]{4}|u\{[0-9a-fA-F][0-9a-fA-F_]*\}|x[0-9a-fA-F]{2})|[^\\'])'/,
1607
1612
  seq(start, content, end)
1608
1613
  );
1609
1614
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-rust",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Rust grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -22,7 +22,7 @@
22
22
  }
23
23
  ],
24
24
  "metadata": {
25
- "version": "3.0.2",
25
+ "version": "3.0.3",
26
26
  "license": "MIT",
27
27
  "description": "Rust grammar for tree-sitter",
28
28
  "authors": [