@willbooster/tree-sitter-php 1.0.1 → 1.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.
@@ -104,6 +104,7 @@ module.exports = function defineGrammar(dialect) {
104
104
  $.heredoc_start,
105
105
  $.heredoc_end,
106
106
  $.nowdoc_string,
107
+ $._heredoc_line_start,
107
108
  $.sentinel_error, // Unused token used to indicate error recovery mode
108
109
  ],
109
110
 
@@ -1457,9 +1458,9 @@ module.exports = function defineGrammar(dialect) {
1457
1458
  string_content: _ => prec.right(repeat1(token.immediate(prec(1, /\\?[^'\\]+/)))),
1458
1459
 
1459
1460
  heredoc_body: $ => seq(
1460
- $._new_line,
1461
+ $._heredoc_new_line,
1461
1462
  repeat1(prec.right(seq(
1462
- optional($._new_line),
1463
+ optional($._heredoc_new_line),
1463
1464
  $._interpolated_string_body_heredoc,
1464
1465
  ))),
1465
1466
  ),
@@ -1472,13 +1473,15 @@ module.exports = function defineGrammar(dialect) {
1472
1473
  choice(
1473
1474
  seq(
1474
1475
  field('value', $.heredoc_body),
1475
- $._new_line,
1476
+ $._heredoc_new_line,
1476
1477
  ),
1477
1478
  field('value', optional($.heredoc_body)),
1478
1479
  ),
1479
1480
  field('end_tag', $.heredoc_end),
1480
1481
  ),
1481
1482
 
1483
+ _heredoc_new_line: $ => seq($._new_line, $._heredoc_line_start),
1484
+
1482
1485
  _new_line: _ => /\r?\n|\r/,
1483
1486
 
1484
1487
  nowdoc_body: $ => seq(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-php",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "PHP grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -49,19 +49,19 @@
49
49
  "@vitest/browser-playwright": "5.0.3",
50
50
  "@willbooster/oxfmt-config": "1.2.2",
51
51
  "@willbooster/oxlint-config": "1.4.8",
52
- "@willbooster/wb": "22.24.0",
53
- "@willbooster/web-tree-sitter": "2.0.1",
54
- "conventional-changelog-conventionalcommits": "10.4.0",
55
- "lefthook": "2.1.16",
56
- "oxfmt": "0.71.0",
57
- "oxlint": "1.86.0",
52
+ "@willbooster/wb": "22.26.1",
53
+ "@willbooster/web-tree-sitter": "2.0.25",
54
+ "conventional-changelog-conventionalcommits": "10.4.1",
55
+ "lefthook": "2.2.1",
56
+ "oxfmt": "0.72.0",
57
+ "oxlint": "1.87.0",
58
58
  "oxlint-tsgolint": "7.0.2003",
59
- "playwright": "1.63.0",
59
+ "playwright": "1.64.0",
60
60
  "semantic-release": "25.0.9",
61
61
  "sort-package-json": "4.0.0",
62
62
  "typescript": "7.0.2",
63
63
  "vitest": "5.0.3",
64
- "wrangler": "4.147.0"
64
+ "wrangler": "4.149.0"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@willbooster/web-tree-sitter": "^2.0.0"
Binary file
Binary file
package/tree-sitter.json CHANGED
@@ -33,7 +33,7 @@
33
33
  }
34
34
  ],
35
35
  "metadata": {
36
- "version": "1.0.1",
36
+ "version": "1.0.3",
37
37
  "license": "MIT",
38
38
  "description": "PHP grammar for tree-sitter",
39
39
  "authors": [