@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
+ [![npm version](https://img.shields.io/npm/v/@willbooster/tree-sitter-php.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-php)
4
+ [![license](https://img.shields.io/npm/l/@willbooster/tree-sitter-php.svg)](https://www.npmjs.com/package/@willbooster/tree-sitter-php)
3
5
  [![Test](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test.yml)
4
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-php/actions/workflows/test-rust.yml)
5
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
- [![wbfy](https://img.shields.io/badge/wbfy-20.36.11-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-20.41.8-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
7
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-php.svg)](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
@@ -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.5",
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
  },
@@ -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,
Binary file
Binary file
package/tree-sitter.json CHANGED
@@ -33,7 +33,7 @@
33
33
  }
34
34
  ],
35
35
  "metadata": {
36
- "version": "1.0.5",
36
+ "version": "1.1.0",
37
37
  "license": "MIT",
38
38
  "description": "PHP grammar for tree-sitter",
39
39
  "authors": [