@willbooster/tree-sitter-php 1.0.4 → 1.0.5
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
|
@@ -10,7 +10,8 @@ PHP grammars for [tree-sitter](https://github.com/tree-sitter/tree-sitter), fork
|
|
|
10
10
|
[tree-sitter/tree-sitter-php](https://github.com/tree-sitter/tree-sitter-php). We are grateful
|
|
11
11
|
to its authors and contributors. This is not an official release of that project.
|
|
12
12
|
|
|
13
|
-
This fork builds on upstream's version 0.24.2 grammars and queries with support for absolute grouped namespace imports
|
|
13
|
+
This fork builds on upstream's version 0.24.2 grammars and queries with support for absolute grouped namespace imports
|
|
14
|
+
and asymmetric visibility in constructor property promotion.
|
|
14
15
|
Its external scanner adapts to the generated array API and fixes incremental heredoc parsing. It generates the parsers with the
|
|
15
16
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parsers carry that fork's own ABI
|
|
16
17
|
number, so they load only with its runtime (`willbooster-tree-sitter`, `@willbooster/web-tree-sitter`), version 2.0.0
|
package/common/define-grammar.js
CHANGED
|
@@ -563,9 +563,11 @@ module.exports = function defineGrammar(dialect) {
|
|
|
563
563
|
|
|
564
564
|
property_promotion_parameter: $ => seq(
|
|
565
565
|
optional(field('attributes', $.attribute_list)),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
repeat1(choice(
|
|
567
|
+
field('visibility', $.visibility_modifier),
|
|
568
|
+
field('readonly', $.readonly_modifier),
|
|
569
|
+
)),
|
|
570
|
+
optional(field('type', $.type)), // Note: callable is not a valid type here, but instead of complicating the parser, we defer this checking to any intelligence using the parser
|
|
569
571
|
field('name', choice($.by_ref, $.variable_name)),
|
|
570
572
|
optional(seq('=', field('default_value', $.expression))),
|
|
571
573
|
optional($.property_hook_list),
|
package/package.json
CHANGED
package/php/src/node-types.json
CHANGED
|
@@ -4188,7 +4188,7 @@
|
|
|
4188
4188
|
]
|
|
4189
4189
|
},
|
|
4190
4190
|
"readonly": {
|
|
4191
|
-
"multiple":
|
|
4191
|
+
"multiple": true,
|
|
4192
4192
|
"required": false,
|
|
4193
4193
|
"types": [
|
|
4194
4194
|
{
|
|
@@ -4208,8 +4208,8 @@
|
|
|
4208
4208
|
]
|
|
4209
4209
|
},
|
|
4210
4210
|
"visibility": {
|
|
4211
|
-
"multiple":
|
|
4212
|
-
"required":
|
|
4211
|
+
"multiple": true,
|
|
4212
|
+
"required": false,
|
|
4213
4213
|
"types": [
|
|
4214
4214
|
{
|
|
4215
4215
|
"type": "visibility_modifier",
|
|
@@ -4188,7 +4188,7 @@
|
|
|
4188
4188
|
]
|
|
4189
4189
|
},
|
|
4190
4190
|
"readonly": {
|
|
4191
|
-
"multiple":
|
|
4191
|
+
"multiple": true,
|
|
4192
4192
|
"required": false,
|
|
4193
4193
|
"types": [
|
|
4194
4194
|
{
|
|
@@ -4208,8 +4208,8 @@
|
|
|
4208
4208
|
]
|
|
4209
4209
|
},
|
|
4210
4210
|
"visibility": {
|
|
4211
|
-
"multiple":
|
|
4212
|
-
"required":
|
|
4211
|
+
"multiple": true,
|
|
4212
|
+
"required": false,
|
|
4213
4213
|
"types": [
|
|
4214
4214
|
{
|
|
4215
4215
|
"type": "visibility_modifier",
|
package/tree-sitter-php.wasm
CHANGED
|
Binary file
|
|
Binary file
|