@willbooster/tree-sitter-bash 1.0.2 → 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 CHANGED
@@ -82,7 +82,7 @@ module.exports = grammar({
82
82
  $.comment,
83
83
  $.heredoc_body,
84
84
  /\s/,
85
- /\\\r?\n/,
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), /\\[^\r\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
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), /\\[^\r\n]/, EXTGLOB_GROUP),
510
- repeat(choice(noneOf(...WORD_BREAKS), /\\[^\r\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
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), /\\[^\r\n]/, EXTGLOB_GROUP, EXTGLOB_NEGATION)),
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.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Bash grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -28,6 +28,7 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "build-prebuilds": "prebuildify --napi --strip --name tree-sitter-bash",
31
+ "build-wasm": "tree-sitter build --wasm",
31
32
  "build/ci": "tree-sitter generate && node-gyp rebuild",
32
33
  "cleanup": "bun wb lint --fix --format",
33
34
  "format": "bun wb lint --format",
@@ -37,7 +38,7 @@
37
38
  "prepare": "(bun lefthook install || true) && (test ! -f .lefthook/normalize-bun-lockfile.sh || bash .lefthook/normalize-bun-lockfile.sh)",
38
39
  "release": "wb release",
39
40
  "release-test": "node node_modules/semantic-release/bin/semantic-release.js --dry-run --plugins @semantic-release/commit-analyzer @semantic-release/release-notes-generator",
40
- "prestart": "tree-sitter build --wasm",
41
+ "prestart": "bun run build-wasm",
41
42
  "start": "tree-sitter playground",
42
43
  "test": "bun wb test",
43
44
  "test/ci": "bun wb test-on-ci",
@@ -50,12 +51,12 @@
50
51
  },
51
52
  "devDependencies": {
52
53
  "@semantic-release/exec": "7.1.0",
53
- "@willbooster/wb": "22.7.1",
54
+ "@willbooster/wb": "22.8.0",
54
55
  "conventional-changelog-conventionalcommits": "9.3.1",
55
56
  "lefthook": "2.1.14",
56
57
  "node-gyp": "13.0.2",
57
58
  "prebuildify": "^6.0.1",
58
- "semantic-release": "25.0.5",
59
+ "semantic-release": "25.0.9",
59
60
  "sort-package-json": "4.0.0",
60
61
  "tree-sitter": "^0.25.0",
61
62
  "tree-sitter-cli": "^0.27.0"
package/src/grammar.json CHANGED
@@ -2471,7 +2471,7 @@
2471
2471
  },
2472
2472
  {
2473
2473
  "type": "PATTERN",
2474
- "value": "\\\\[^\\r\\n]"
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": "\\\\[^\\r\\n]"
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": "\\\\[^\\r\\n]"
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": "\\\\[^\\r\\n]"
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": "\\\\\\r?\\n"
4608
+ "value": "\\\\\\n"
4609
4609
  },
4610
4610
  {
4611
4611
  "type": "SYMBOL",