@willbooster/tree-sitter-php 1.0.5 → 1.1.0
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/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# @willbooster/tree-sitter-php
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@willbooster/tree-sitter-php)
|
|
4
|
+
[](https://www.npmjs.com/package/@willbooster/tree-sitter-php)
|
|
3
5
|
[](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test.yml)
|
|
4
6
|
[](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test-rust.yml)
|
|
5
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
6
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
7
9
|
[](https://crates.io/crates/willbooster-tree-sitter-php)
|
|
8
10
|
|
|
9
11
|
PHP grammars for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
package/common/define-grammar.js
CHANGED
|
@@ -1265,12 +1265,11 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1265
1265
|
|
|
1266
1266
|
variadic_placeholder: _ => '...',
|
|
1267
1267
|
|
|
1268
|
+
argument_placeholder: _ => '?',
|
|
1269
|
+
|
|
1268
1270
|
arguments: $ => seq(
|
|
1269
1271
|
'(',
|
|
1270
|
-
optional(choice(
|
|
1271
|
-
seq(commaSep1($.argument), optional(',')),
|
|
1272
|
-
$.variadic_placeholder,
|
|
1273
|
-
)),
|
|
1272
|
+
optional(seq(commaSep1(choice($.argument, $.variadic_placeholder)), optional(','))),
|
|
1274
1273
|
')',
|
|
1275
1274
|
),
|
|
1276
1275
|
|
|
@@ -1281,6 +1280,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1281
1280
|
alias($.relative_scope, $.name),
|
|
1282
1281
|
$.variadic_unpacking,
|
|
1283
1282
|
$.expression,
|
|
1283
|
+
$.argument_placeholder,
|
|
1284
1284
|
),
|
|
1285
1285
|
),
|
|
1286
1286
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-php",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "PHP grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"playwright": "1.64.0",
|
|
60
60
|
"semantic-release": "25.0.9",
|
|
61
61
|
"sort-package-json": "4.0.0",
|
|
62
|
-
"typescript": "7.0.2",
|
|
63
62
|
"vitest": "5.0.3",
|
|
64
63
|
"wrangler": "4.149.0"
|
|
65
64
|
},
|
package/php/src/node-types.json
CHANGED
|
@@ -566,6 +566,10 @@
|
|
|
566
566
|
"multiple": false,
|
|
567
567
|
"required": true,
|
|
568
568
|
"types": [
|
|
569
|
+
{
|
|
570
|
+
"type": "argument_placeholder",
|
|
571
|
+
"named": true
|
|
572
|
+
},
|
|
569
573
|
{
|
|
570
574
|
"type": "expression",
|
|
571
575
|
"named": true
|
|
@@ -581,6 +585,11 @@
|
|
|
581
585
|
]
|
|
582
586
|
}
|
|
583
587
|
},
|
|
588
|
+
{
|
|
589
|
+
"type": "argument_placeholder",
|
|
590
|
+
"named": true,
|
|
591
|
+
"fields": {}
|
|
592
|
+
},
|
|
584
593
|
{
|
|
585
594
|
"type": "arguments",
|
|
586
595
|
"named": true,
|
|
@@ -566,6 +566,10 @@
|
|
|
566
566
|
"multiple": false,
|
|
567
567
|
"required": true,
|
|
568
568
|
"types": [
|
|
569
|
+
{
|
|
570
|
+
"type": "argument_placeholder",
|
|
571
|
+
"named": true
|
|
572
|
+
},
|
|
569
573
|
{
|
|
570
574
|
"type": "expression",
|
|
571
575
|
"named": true
|
|
@@ -581,6 +585,11 @@
|
|
|
581
585
|
]
|
|
582
586
|
}
|
|
583
587
|
},
|
|
588
|
+
{
|
|
589
|
+
"type": "argument_placeholder",
|
|
590
|
+
"named": true,
|
|
591
|
+
"fields": {}
|
|
592
|
+
},
|
|
584
593
|
{
|
|
585
594
|
"type": "arguments",
|
|
586
595
|
"named": true,
|
package/tree-sitter-php.wasm
CHANGED
|
Binary file
|
|
Binary file
|