@willbooster/tree-sitter-php 1.1.0 → 1.2.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/common/define-grammar.js +71 -55
- package/package.json +1 -1
- package/php/src/node-types.json +17 -27
- package/php_only/src/node-types.json +17 -27
- package/tree-sitter-php.wasm +0 -0
- package/tree-sitter-php_only.wasm +0 -0
- package/tree-sitter.json +1 -1
package/common/define-grammar.js
CHANGED
|
@@ -57,18 +57,25 @@ const BASE_RESERVED_KEYWORD_SET = [
|
|
|
57
57
|
'instanceof', 'insteadof', 'interface', 'match', 'namespace', 'new',
|
|
58
58
|
'or', 'print', 'private', 'protected', 'public', 'readonly',
|
|
59
59
|
'require', 'require_once', 'return', 'static', 'switch', 'throw',
|
|
60
|
-
'trait', 'try', 'use', 'var', 'while', 'xor', 'yield from', 'yield',
|
|
60
|
+
'trait', 'try', 'unset', 'use', 'var', 'while', 'xor', 'yield from', 'yield',
|
|
61
61
|
].map(r => keyword(r, false));
|
|
62
62
|
|
|
63
|
+
const IDENTIFIER_TYPE_KEYWORDS = ['bool', 'float', 'int', 'object', 'string'].map(word => keyword(word, false));
|
|
64
|
+
|
|
63
65
|
/**
|
|
64
66
|
* Other keywords that are reserved in PHP, and cannot be used as class names.
|
|
65
67
|
*
|
|
66
68
|
* @see https://www.php.net/manual/en/reserved.other-reserved-words.php
|
|
67
69
|
*/
|
|
68
70
|
const OTHER_RESERVED_KEYWORD_SET = [
|
|
69
|
-
|
|
70
|
-
'
|
|
71
|
-
]
|
|
71
|
+
...IDENTIFIER_TYPE_KEYWORDS,
|
|
72
|
+
...['false', 'iterable', 'mixed', 'never', 'null', 'true', 'void'].map(word => keyword(word, false)),
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
const CAST_TYPES = [
|
|
76
|
+
'array', 'binary', 'bool', 'boolean', 'double', 'float',
|
|
77
|
+
'int', 'integer', 'object', 'real', 'string', 'unset',
|
|
78
|
+
];
|
|
72
79
|
|
|
73
80
|
module.exports = function defineGrammar(dialect) {
|
|
74
81
|
if (dialect !== 'php' && dialect !== 'php_only') {
|
|
@@ -90,6 +97,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
90
97
|
|
|
91
98
|
[$.namespace_name],
|
|
92
99
|
[$.heredoc_body],
|
|
100
|
+
[$.parenthesized_expression, $.argument],
|
|
93
101
|
],
|
|
94
102
|
|
|
95
103
|
externals: $ => [
|
|
@@ -122,6 +130,8 @@ module.exports = function defineGrammar(dialect) {
|
|
|
122
130
|
},
|
|
123
131
|
|
|
124
132
|
inline: $ => [
|
|
133
|
+
$._identifier,
|
|
134
|
+
$._unreserved_identifier,
|
|
125
135
|
$._variable,
|
|
126
136
|
$._namespace_use_type,
|
|
127
137
|
],
|
|
@@ -256,15 +266,15 @@ module.exports = function defineGrammar(dialect) {
|
|
|
256
266
|
|
|
257
267
|
namespace_use_clause: $ => seq(
|
|
258
268
|
field('type', optional($._namespace_use_type)),
|
|
259
|
-
choice($.
|
|
260
|
-
optional(seq(keyword('as'), field('alias', $.
|
|
269
|
+
choice($._identifier, $.qualified_name),
|
|
270
|
+
optional(seq(keyword('as'), field('alias', $._identifier))),
|
|
261
271
|
),
|
|
262
272
|
|
|
263
273
|
_namespace_use_type: _ => choice(keyword('function'), keyword('const')),
|
|
264
274
|
|
|
265
275
|
qualified_name: $ => seq(
|
|
266
276
|
field('prefix', seq(optional('\\'), optional($.namespace_name), '\\')),
|
|
267
|
-
|
|
277
|
+
$._unreserved_identifier,
|
|
268
278
|
),
|
|
269
279
|
|
|
270
280
|
relative_name: $ => seq(
|
|
@@ -273,19 +283,20 @@ module.exports = function defineGrammar(dialect) {
|
|
|
273
283
|
optional(seq('\\', $.namespace_name)),
|
|
274
284
|
'\\',
|
|
275
285
|
)),
|
|
276
|
-
|
|
286
|
+
$._unreserved_identifier,
|
|
277
287
|
),
|
|
278
288
|
|
|
279
289
|
_name: $ => choice(
|
|
280
290
|
alias(keyword('static', false), $.name),
|
|
291
|
+
alias(choice(...IDENTIFIER_TYPE_KEYWORDS), $.name),
|
|
281
292
|
reserved('classes', $.name),
|
|
282
293
|
$.qualified_name,
|
|
283
294
|
$.relative_name,
|
|
284
295
|
),
|
|
285
296
|
|
|
286
297
|
namespace_name: $ => seq(
|
|
287
|
-
|
|
288
|
-
repeat(seq('\\',
|
|
298
|
+
$._unreserved_identifier,
|
|
299
|
+
repeat(seq('\\', $._unreserved_identifier)),
|
|
289
300
|
),
|
|
290
301
|
|
|
291
302
|
_namespace_use_group: $ => seq(
|
|
@@ -339,7 +350,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
339
350
|
enum_case: $ => seq(
|
|
340
351
|
optional(field('attributes', $.attribute_list)),
|
|
341
352
|
keyword('case'),
|
|
342
|
-
field('name',
|
|
353
|
+
field('name', $._unreserved_identifier),
|
|
343
354
|
optional(seq('=', field('value', $.expression))),
|
|
344
355
|
$._semicolon,
|
|
345
356
|
),
|
|
@@ -422,7 +433,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
422
433
|
optional(field('attributes', $.attribute_list)),
|
|
423
434
|
optional(field('final', $.final_modifier)),
|
|
424
435
|
optional(field('reference_modifier', $.reference_modifier)),
|
|
425
|
-
$.
|
|
436
|
+
$._identifier,
|
|
426
437
|
optional(field('parameters', $.formal_parameters)),
|
|
427
438
|
$._property_hook_body,
|
|
428
439
|
),
|
|
@@ -438,7 +449,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
438
449
|
repeat($._modifier),
|
|
439
450
|
keyword('function'),
|
|
440
451
|
optional($.reference_modifier),
|
|
441
|
-
field('name',
|
|
452
|
+
field('name', $._unreserved_identifier),
|
|
442
453
|
field('parameters', $.formal_parameters),
|
|
443
454
|
optional($._return_type),
|
|
444
455
|
choice(
|
|
@@ -471,20 +482,20 @@ module.exports = function defineGrammar(dialect) {
|
|
|
471
482
|
use_instead_of_clause: $ => prec.left(seq(
|
|
472
483
|
$.class_constant_access_expression,
|
|
473
484
|
keyword('insteadof'),
|
|
474
|
-
$.
|
|
485
|
+
$._identifier,
|
|
475
486
|
)),
|
|
476
487
|
|
|
477
488
|
use_as_clause: $ => seq(
|
|
478
|
-
choice($.class_constant_access_expression, $.
|
|
489
|
+
choice($.class_constant_access_expression, $._unreserved_identifier),
|
|
479
490
|
keyword('as'),
|
|
480
491
|
choice(
|
|
481
492
|
seq(
|
|
482
493
|
optional($.visibility_modifier),
|
|
483
|
-
$.
|
|
494
|
+
$._unreserved_identifier,
|
|
484
495
|
),
|
|
485
496
|
seq(
|
|
486
497
|
$.visibility_modifier,
|
|
487
|
-
optional($.
|
|
498
|
+
optional($._unreserved_identifier),
|
|
488
499
|
),
|
|
489
500
|
),
|
|
490
501
|
),
|
|
@@ -497,7 +508,10 @@ module.exports = function defineGrammar(dialect) {
|
|
|
497
508
|
),
|
|
498
509
|
optional(seq(
|
|
499
510
|
token.immediate('('),
|
|
500
|
-
|
|
511
|
+
choice(
|
|
512
|
+
alias($.name, $.operation),
|
|
513
|
+
alias(choice(...IDENTIFIER_TYPE_KEYWORDS), $.operation),
|
|
514
|
+
),
|
|
501
515
|
token.immediate(')'),
|
|
502
516
|
)),
|
|
503
517
|
),
|
|
@@ -506,7 +520,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
506
520
|
optional(field('attributes', $.attribute_list)),
|
|
507
521
|
keyword('function'),
|
|
508
522
|
optional($.reference_modifier),
|
|
509
|
-
field('name', $.
|
|
523
|
+
field('name', $._identifier),
|
|
510
524
|
field('parameters', $.formal_parameters),
|
|
511
525
|
optional($._return_type),
|
|
512
526
|
field('body', $.compound_statement),
|
|
@@ -628,40 +642,23 @@ module.exports = function defineGrammar(dialect) {
|
|
|
628
642
|
))),
|
|
629
643
|
|
|
630
644
|
primitive_type: _ => choice(
|
|
645
|
+
...IDENTIFIER_TYPE_KEYWORDS,
|
|
631
646
|
'array',
|
|
632
|
-
'bool',
|
|
633
647
|
keyword('callable', false), // not legal in property types
|
|
634
648
|
keyword('false', false),
|
|
635
|
-
'float',
|
|
636
|
-
'int',
|
|
637
649
|
keyword('iterable', false),
|
|
638
650
|
keyword('mixed', false),
|
|
639
651
|
'null',
|
|
640
|
-
'object',
|
|
641
|
-
'string',
|
|
642
652
|
keyword('true', false),
|
|
643
653
|
keyword('void', false),
|
|
644
654
|
),
|
|
645
655
|
|
|
646
|
-
cast_type: _ => choice(
|
|
647
|
-
keyword('array', false),
|
|
648
|
-
keyword('binary', false),
|
|
649
|
-
keyword('bool', false),
|
|
650
|
-
keyword('boolean', false),
|
|
651
|
-
keyword('double', false),
|
|
652
|
-
keyword('float', false),
|
|
653
|
-
keyword('int', false),
|
|
654
|
-
keyword('integer', false),
|
|
655
|
-
keyword('object', false),
|
|
656
|
-
keyword('real', false),
|
|
657
|
-
keyword('string', false),
|
|
658
|
-
keyword('unset', false),
|
|
659
|
-
),
|
|
656
|
+
cast_type: _ => token(seq('(', /[ \t]*/, choice(...CAST_TYPES.map(type => new RegExp(type, 'i'))), /[ \t]*/, ')')),
|
|
660
657
|
|
|
661
658
|
_return_type: $ => seq(':', field('return_type', choice($.type, $.bottom_type))),
|
|
662
659
|
|
|
663
|
-
_const_element: $ => seq($.
|
|
664
|
-
_class_const_element: $ => seq(
|
|
660
|
+
_const_element: $ => seq($._identifier, '=', $.expression),
|
|
661
|
+
_class_const_element: $ => seq($._unreserved_identifier, '=', $.expression),
|
|
665
662
|
|
|
666
663
|
echo_statement: $ => seq(keyword('echo'), $._expressions, $._semicolon),
|
|
667
664
|
|
|
@@ -672,7 +669,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
672
669
|
),
|
|
673
670
|
|
|
674
671
|
unset_statement: $ => seq(
|
|
675
|
-
'unset',
|
|
672
|
+
keyword('unset'),
|
|
676
673
|
'(',
|
|
677
674
|
commaSep1($._variable),
|
|
678
675
|
optional(','),
|
|
@@ -728,7 +725,12 @@ module.exports = function defineGrammar(dialect) {
|
|
|
728
725
|
field('body', $.compound_statement),
|
|
729
726
|
),
|
|
730
727
|
|
|
731
|
-
type_list: $ => pipeSep1(
|
|
728
|
+
type_list: $ => pipeSep1(choice(
|
|
729
|
+
$.named_type,
|
|
730
|
+
alias($._catch_type_keyword, $.named_type),
|
|
731
|
+
)),
|
|
732
|
+
|
|
733
|
+
_catch_type_keyword: $ => alias(choice(...IDENTIFIER_TYPE_KEYWORDS), $.name),
|
|
732
734
|
|
|
733
735
|
finally_clause: $ => seq(
|
|
734
736
|
keyword('finally'),
|
|
@@ -736,7 +738,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
736
738
|
),
|
|
737
739
|
|
|
738
740
|
goto_statement: $ => seq(
|
|
739
|
-
keyword('goto'), $.
|
|
741
|
+
keyword('goto'), $._identifier, $._semicolon,
|
|
740
742
|
),
|
|
741
743
|
|
|
742
744
|
continue_statement: $ => seq(
|
|
@@ -964,7 +966,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
964
966
|
|
|
965
967
|
compound_statement: $ => seq('{', repeat($.statement), '}'),
|
|
966
968
|
|
|
967
|
-
named_label_statement: $ => seq($.
|
|
969
|
+
named_label_statement: $ => seq($._identifier, ':'),
|
|
968
970
|
|
|
969
971
|
expression_statement: $ => seq($.expression, $._semicolon),
|
|
970
972
|
|
|
@@ -998,7 +1000,13 @@ module.exports = function defineGrammar(dialect) {
|
|
|
998
1000
|
|
|
999
1001
|
error_suppression_expression: $ => prec(PREC.INC, seq('@', $.expression)),
|
|
1000
1002
|
|
|
1001
|
-
clone_expression: $ => seq(
|
|
1003
|
+
clone_expression: $ => seq(
|
|
1004
|
+
keyword('clone'),
|
|
1005
|
+
choice(
|
|
1006
|
+
$.primary_expression,
|
|
1007
|
+
field('arguments', $.arguments),
|
|
1008
|
+
),
|
|
1009
|
+
),
|
|
1002
1010
|
|
|
1003
1011
|
primary_expression: $ => choice(
|
|
1004
1012
|
$._variable,
|
|
@@ -1006,7 +1014,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1006
1014
|
$.class_constant_access_expression,
|
|
1007
1015
|
$.qualified_name,
|
|
1008
1016
|
$.relative_name,
|
|
1009
|
-
$.
|
|
1017
|
+
$._identifier,
|
|
1010
1018
|
$.array_creation_expression,
|
|
1011
1019
|
$.print_intrinsic,
|
|
1012
1020
|
$.anonymous_function,
|
|
@@ -1024,7 +1032,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1024
1032
|
$._scope_resolution_qualifier,
|
|
1025
1033
|
'::',
|
|
1026
1034
|
choice(
|
|
1027
|
-
|
|
1035
|
+
$._unreserved_identifier,
|
|
1028
1036
|
seq('{', alias($.expression, $.name), '}'),
|
|
1029
1037
|
),
|
|
1030
1038
|
),
|
|
@@ -1077,9 +1085,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1077
1085
|
},
|
|
1078
1086
|
|
|
1079
1087
|
cast_expression: $ => prec(PREC.CAST, seq(
|
|
1080
|
-
'(',
|
|
1081
1088
|
field('type', $.cast_type),
|
|
1082
|
-
')',
|
|
1083
1089
|
field('value', choice(
|
|
1084
1090
|
$._unary_expression,
|
|
1085
1091
|
$.include_expression,
|
|
@@ -1089,7 +1095,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1089
1095
|
)),
|
|
1090
1096
|
|
|
1091
1097
|
cast_variable: $ => prec(PREC.CAST, seq(
|
|
1092
|
-
|
|
1098
|
+
field('type', $.cast_type),
|
|
1093
1099
|
field('value', $._variable),
|
|
1094
1100
|
)),
|
|
1095
1101
|
|
|
@@ -1287,7 +1293,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1287
1293
|
_argument_name: $ => seq(
|
|
1288
1294
|
field('name', alias(
|
|
1289
1295
|
choice(
|
|
1290
|
-
|
|
1296
|
+
$._unreserved_identifier,
|
|
1291
1297
|
keyword('array', false),
|
|
1292
1298
|
keyword('fn', false),
|
|
1293
1299
|
keyword('function', false),
|
|
@@ -1322,7 +1328,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1322
1328
|
variadic_unpacking: $ => seq('...', $.expression),
|
|
1323
1329
|
|
|
1324
1330
|
_member_name: $ => choice(
|
|
1325
|
-
field('name', choice(
|
|
1331
|
+
field('name', choice($._unreserved_identifier, $._simple_variable)),
|
|
1326
1332
|
seq('{', field('name', $.expression), '}'),
|
|
1327
1333
|
),
|
|
1328
1334
|
|
|
@@ -1374,7 +1380,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1374
1380
|
_simple_string_member_access_expression: $ => prec(PREC.MEMBER, seq(
|
|
1375
1381
|
field('object', $.variable_name),
|
|
1376
1382
|
'->',
|
|
1377
|
-
field('name', $.
|
|
1383
|
+
field('name', $._unreserved_identifier),
|
|
1378
1384
|
)),
|
|
1379
1385
|
|
|
1380
1386
|
_simple_string_subscript_unary_expression: $ => prec.left(seq('-', $.integer)),
|
|
@@ -1382,7 +1388,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1382
1388
|
_simple_string_array_access_argument: $ => choice(
|
|
1383
1389
|
$.integer,
|
|
1384
1390
|
alias($._simple_string_subscript_unary_expression, $.unary_op_expression),
|
|
1385
|
-
$.
|
|
1391
|
+
$._unreserved_identifier,
|
|
1386
1392
|
$.variable_name,
|
|
1387
1393
|
),
|
|
1388
1394
|
|
|
@@ -1554,7 +1560,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1554
1560
|
$.scoped_call_expression,
|
|
1555
1561
|
),
|
|
1556
1562
|
|
|
1557
|
-
variable_name: $ => seq('$',
|
|
1563
|
+
variable_name: $ => seq('$', $._unreserved_identifier),
|
|
1558
1564
|
|
|
1559
1565
|
by_ref: $ => seq('&', $._variable),
|
|
1560
1566
|
|
|
@@ -1628,6 +1634,16 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1628
1634
|
require_expression: $ => seq(keyword('require'), $.expression),
|
|
1629
1635
|
require_once_expression: $ => seq(keyword('require_once'), $.expression),
|
|
1630
1636
|
|
|
1637
|
+
_unreserved_identifier: $ => choice(
|
|
1638
|
+
reserved('nothing', $.name),
|
|
1639
|
+
alias(choice(...IDENTIFIER_TYPE_KEYWORDS, keyword('unset', false)), $.name),
|
|
1640
|
+
),
|
|
1641
|
+
|
|
1642
|
+
_identifier: $ => choice(
|
|
1643
|
+
$.name,
|
|
1644
|
+
alias(choice(...IDENTIFIER_TYPE_KEYWORDS), $.name),
|
|
1645
|
+
),
|
|
1646
|
+
|
|
1631
1647
|
// Note that PHP officially only supports the following character regex
|
|
1632
1648
|
// for identifiers: ^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$
|
|
1633
1649
|
// However, there is a "bug" in how PHP parses multi-byte characters that allows
|
package/package.json
CHANGED
package/php/src/node-types.json
CHANGED
|
@@ -1337,11 +1337,6 @@
|
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
},
|
|
1340
|
-
{
|
|
1341
|
-
"type": "cast_type",
|
|
1342
|
-
"named": true,
|
|
1343
|
-
"fields": {}
|
|
1344
|
-
},
|
|
1345
1340
|
{
|
|
1346
1341
|
"type": "catch_clause",
|
|
1347
1342
|
"named": true,
|
|
@@ -1581,10 +1576,21 @@
|
|
|
1581
1576
|
{
|
|
1582
1577
|
"type": "clone_expression",
|
|
1583
1578
|
"named": true,
|
|
1584
|
-
"fields": {
|
|
1579
|
+
"fields": {
|
|
1580
|
+
"arguments": {
|
|
1581
|
+
"multiple": false,
|
|
1582
|
+
"required": false,
|
|
1583
|
+
"types": [
|
|
1584
|
+
{
|
|
1585
|
+
"type": "arguments",
|
|
1586
|
+
"named": true
|
|
1587
|
+
}
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1585
1591
|
"children": {
|
|
1586
1592
|
"multiple": false,
|
|
1587
|
-
"required":
|
|
1593
|
+
"required": false,
|
|
1588
1594
|
"types": [
|
|
1589
1595
|
{
|
|
1590
1596
|
"type": "primary_expression",
|
|
@@ -5813,10 +5819,6 @@
|
|
|
5813
5819
|
"type": "as",
|
|
5814
5820
|
"named": false
|
|
5815
5821
|
},
|
|
5816
|
-
{
|
|
5817
|
-
"type": "bool",
|
|
5818
|
-
"named": false
|
|
5819
|
-
},
|
|
5820
5822
|
{
|
|
5821
5823
|
"type": "bottom_type",
|
|
5822
5824
|
"named": true
|
|
@@ -5829,6 +5831,10 @@
|
|
|
5829
5831
|
"type": "case",
|
|
5830
5832
|
"named": false
|
|
5831
5833
|
},
|
|
5834
|
+
{
|
|
5835
|
+
"type": "cast_type",
|
|
5836
|
+
"named": true
|
|
5837
|
+
},
|
|
5832
5838
|
{
|
|
5833
5839
|
"type": "catch",
|
|
5834
5840
|
"named": false
|
|
@@ -5930,10 +5936,6 @@
|
|
|
5930
5936
|
"type": "finally",
|
|
5931
5937
|
"named": false
|
|
5932
5938
|
},
|
|
5933
|
-
{
|
|
5934
|
-
"type": "float",
|
|
5935
|
-
"named": false
|
|
5936
|
-
},
|
|
5937
5939
|
{
|
|
5938
5940
|
"type": "float",
|
|
5939
5941
|
"named": true
|
|
@@ -5994,10 +5996,6 @@
|
|
|
5994
5996
|
"type": "insteadof",
|
|
5995
5997
|
"named": false
|
|
5996
5998
|
},
|
|
5997
|
-
{
|
|
5998
|
-
"type": "int",
|
|
5999
|
-
"named": false
|
|
6000
|
-
},
|
|
6001
5999
|
{
|
|
6002
6000
|
"type": "integer",
|
|
6003
6001
|
"named": true
|
|
@@ -6030,10 +6028,6 @@
|
|
|
6030
6028
|
"type": "null",
|
|
6031
6029
|
"named": false
|
|
6032
6030
|
},
|
|
6033
|
-
{
|
|
6034
|
-
"type": "object",
|
|
6035
|
-
"named": false
|
|
6036
|
-
},
|
|
6037
6031
|
{
|
|
6038
6032
|
"type": "operation",
|
|
6039
6033
|
"named": true
|
|
@@ -6098,10 +6092,6 @@
|
|
|
6098
6092
|
"type": "strict_types",
|
|
6099
6093
|
"named": false
|
|
6100
6094
|
},
|
|
6101
|
-
{
|
|
6102
|
-
"type": "string",
|
|
6103
|
-
"named": false
|
|
6104
|
-
},
|
|
6105
6095
|
{
|
|
6106
6096
|
"type": "switch",
|
|
6107
6097
|
"named": false
|
|
@@ -1337,11 +1337,6 @@
|
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
},
|
|
1340
|
-
{
|
|
1341
|
-
"type": "cast_type",
|
|
1342
|
-
"named": true,
|
|
1343
|
-
"fields": {}
|
|
1344
|
-
},
|
|
1345
1340
|
{
|
|
1346
1341
|
"type": "catch_clause",
|
|
1347
1342
|
"named": true,
|
|
@@ -1581,10 +1576,21 @@
|
|
|
1581
1576
|
{
|
|
1582
1577
|
"type": "clone_expression",
|
|
1583
1578
|
"named": true,
|
|
1584
|
-
"fields": {
|
|
1579
|
+
"fields": {
|
|
1580
|
+
"arguments": {
|
|
1581
|
+
"multiple": false,
|
|
1582
|
+
"required": false,
|
|
1583
|
+
"types": [
|
|
1584
|
+
{
|
|
1585
|
+
"type": "arguments",
|
|
1586
|
+
"named": true
|
|
1587
|
+
}
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1585
1591
|
"children": {
|
|
1586
1592
|
"multiple": false,
|
|
1587
|
-
"required":
|
|
1593
|
+
"required": false,
|
|
1588
1594
|
"types": [
|
|
1589
1595
|
{
|
|
1590
1596
|
"type": "primary_expression",
|
|
@@ -5784,10 +5790,6 @@
|
|
|
5784
5790
|
"type": "as",
|
|
5785
5791
|
"named": false
|
|
5786
5792
|
},
|
|
5787
|
-
{
|
|
5788
|
-
"type": "bool",
|
|
5789
|
-
"named": false
|
|
5790
|
-
},
|
|
5791
5793
|
{
|
|
5792
5794
|
"type": "bottom_type",
|
|
5793
5795
|
"named": true
|
|
@@ -5800,6 +5802,10 @@
|
|
|
5800
5802
|
"type": "case",
|
|
5801
5803
|
"named": false
|
|
5802
5804
|
},
|
|
5805
|
+
{
|
|
5806
|
+
"type": "cast_type",
|
|
5807
|
+
"named": true
|
|
5808
|
+
},
|
|
5803
5809
|
{
|
|
5804
5810
|
"type": "catch",
|
|
5805
5811
|
"named": false
|
|
@@ -5901,10 +5907,6 @@
|
|
|
5901
5907
|
"type": "finally",
|
|
5902
5908
|
"named": false
|
|
5903
5909
|
},
|
|
5904
|
-
{
|
|
5905
|
-
"type": "float",
|
|
5906
|
-
"named": false
|
|
5907
|
-
},
|
|
5908
5910
|
{
|
|
5909
5911
|
"type": "float",
|
|
5910
5912
|
"named": true
|
|
@@ -5965,10 +5967,6 @@
|
|
|
5965
5967
|
"type": "insteadof",
|
|
5966
5968
|
"named": false
|
|
5967
5969
|
},
|
|
5968
|
-
{
|
|
5969
|
-
"type": "int",
|
|
5970
|
-
"named": false
|
|
5971
|
-
},
|
|
5972
5970
|
{
|
|
5973
5971
|
"type": "integer",
|
|
5974
5972
|
"named": true
|
|
@@ -6001,10 +5999,6 @@
|
|
|
6001
5999
|
"type": "null",
|
|
6002
6000
|
"named": false
|
|
6003
6001
|
},
|
|
6004
|
-
{
|
|
6005
|
-
"type": "object",
|
|
6006
|
-
"named": false
|
|
6007
|
-
},
|
|
6008
6002
|
{
|
|
6009
6003
|
"type": "operation",
|
|
6010
6004
|
"named": true
|
|
@@ -6069,10 +6063,6 @@
|
|
|
6069
6063
|
"type": "strict_types",
|
|
6070
6064
|
"named": false
|
|
6071
6065
|
},
|
|
6072
|
-
{
|
|
6073
|
-
"type": "string",
|
|
6074
|
-
"named": false
|
|
6075
|
-
},
|
|
6076
6066
|
{
|
|
6077
6067
|
"type": "switch",
|
|
6078
6068
|
"named": false
|
package/tree-sitter-php.wasm
CHANGED
|
Binary file
|
|
Binary file
|