@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 +8 -3
- package/package.json +1 -1
- package/tree-sitter-rust.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -1508,14 +1508,19 @@ module.exports = grammar({
|
|
|
1508
1508
|
optional('b'),
|
|
1509
1509
|
"'",
|
|
1510
1510
|
optional(
|
|
1511
|
-
choice(
|
|
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(
|
|
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]
|
|
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
package/tree-sitter-rust.wasm
CHANGED
|
Binary file
|