@willbooster/tree-sitter-bash 1.1.0 → 1.1.1
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 +5 -5
- package/package.json +2 -2
- package/prebuilds/darwin-arm64/tree-sitter-bash.node +0 -0
- package/prebuilds/darwin-x64/tree-sitter-bash.node +0 -0
- package/prebuilds/linux-arm64/tree-sitter-bash.node +0 -0
- package/prebuilds/linux-x64/tree-sitter-bash.node +0 -0
- package/src/grammar.json +5 -5
- package/src/parser.c +7510 -7712
- package/src/scanner.c +12 -48
- package/tree-sitter-bash.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports = grammar({
|
|
|
82
82
|
$.comment,
|
|
83
83
|
$.heredoc_body,
|
|
84
84
|
/\s/,
|
|
85
|
-
/\\\
|
|
85
|
+
/\\\n/,
|
|
86
86
|
$._line_continuation,
|
|
87
87
|
],
|
|
88
88
|
|
|
@@ -474,7 +474,7 @@ module.exports = grammar({
|
|
|
474
474
|
|
|
475
475
|
_negated_extglob_word: _ => token(prec(1, seq(
|
|
476
476
|
EXTGLOB_NEGATION,
|
|
477
|
-
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\
|
|
477
|
+
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
|
|
478
478
|
))),
|
|
479
479
|
|
|
480
480
|
concatenation: $ => prec.right(seq(
|
|
@@ -506,8 +506,8 @@ module.exports = grammar({
|
|
|
506
506
|
// An extglob group (`@(a|b)`) is part of the word; `!(` only inside a word, since a leading `!`
|
|
507
507
|
// before `(` negates a subshell.
|
|
508
508
|
word: _ => token(seq(
|
|
509
|
-
choice(noneOf('#', ...WORD_BREAKS), /\\[^\
|
|
510
|
-
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\
|
|
509
|
+
choice(noneOf('#', ...WORD_BREAKS), /\\[^\n]/, EXTGLOB_GROUP),
|
|
510
|
+
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
|
|
511
511
|
)),
|
|
512
512
|
|
|
513
513
|
// A `#` inside a word (`a$b#c`) is literal; only a `#` that begins a word starts a comment.
|
|
@@ -533,7 +533,7 @@ module.exports = grammar({
|
|
|
533
533
|
|
|
534
534
|
_hash_word: _ => token(prec(1, seq(
|
|
535
535
|
'#',
|
|
536
|
-
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\
|
|
536
|
+
repeat(choice(noneOf(...WORD_BREAKS), /\\[^\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
|
|
537
537
|
))),
|
|
538
538
|
|
|
539
539
|
string: $ => seq(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-bash",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Bash grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@semantic-release/exec": "7.1.0",
|
|
54
|
-
"@willbooster/wb": "22.
|
|
54
|
+
"@willbooster/wb": "22.8.0",
|
|
55
55
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
56
56
|
"lefthook": "2.1.14",
|
|
57
57
|
"node-gyp": "13.0.2",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/grammar.json
CHANGED
|
@@ -2471,7 +2471,7 @@
|
|
|
2471
2471
|
},
|
|
2472
2472
|
{
|
|
2473
2473
|
"type": "PATTERN",
|
|
2474
|
-
"value": "\\\\[^\\
|
|
2474
|
+
"value": "\\\\[^\\n]"
|
|
2475
2475
|
},
|
|
2476
2476
|
{
|
|
2477
2477
|
"type": "PATTERN",
|
|
@@ -2621,7 +2621,7 @@
|
|
|
2621
2621
|
},
|
|
2622
2622
|
{
|
|
2623
2623
|
"type": "PATTERN",
|
|
2624
|
-
"value": "\\\\[^\\
|
|
2624
|
+
"value": "\\\\[^\\n]"
|
|
2625
2625
|
},
|
|
2626
2626
|
{
|
|
2627
2627
|
"type": "PATTERN",
|
|
@@ -2640,7 +2640,7 @@
|
|
|
2640
2640
|
},
|
|
2641
2641
|
{
|
|
2642
2642
|
"type": "PATTERN",
|
|
2643
|
-
"value": "\\\\[^\\
|
|
2643
|
+
"value": "\\\\[^\\n]"
|
|
2644
2644
|
},
|
|
2645
2645
|
{
|
|
2646
2646
|
"type": "PATTERN",
|
|
@@ -2822,7 +2822,7 @@
|
|
|
2822
2822
|
},
|
|
2823
2823
|
{
|
|
2824
2824
|
"type": "PATTERN",
|
|
2825
|
-
"value": "\\\\[^\\
|
|
2825
|
+
"value": "\\\\[^\\n]"
|
|
2826
2826
|
},
|
|
2827
2827
|
{
|
|
2828
2828
|
"type": "PATTERN",
|
|
@@ -4605,7 +4605,7 @@
|
|
|
4605
4605
|
},
|
|
4606
4606
|
{
|
|
4607
4607
|
"type": "PATTERN",
|
|
4608
|
-
"value": "\\\\\\
|
|
4608
|
+
"value": "\\\\\\n"
|
|
4609
4609
|
},
|
|
4610
4610
|
{
|
|
4611
4611
|
"type": "SYMBOL",
|