@ant-yasa/uast-parser-php 0.2.9 → 0.2.10

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.
Files changed (33) hide show
  1. package/dist/package.json +1 -1
  2. package/package.json +1 -1
  3. package/src/index.ts +26 -0
  4. package/src/parser.ts +1234 -0
  5. package/tests/benchmark/base/advanced.php +20 -0
  6. package/tests/benchmark/base/advanced.php.json +1269 -0
  7. package/tests/benchmark/base/basic.php +3 -0
  8. package/tests/benchmark/base/basic.php.json +292 -0
  9. package/tests/benchmark/base/closure-class.php +24 -0
  10. package/tests/benchmark/base/closure-class.php.json +1623 -0
  11. package/tests/benchmark/base/control-flow.php +37 -0
  12. package/tests/benchmark/base/control-flow.php.json +2010 -0
  13. package/tests/benchmark/base/enum-trait-adapt.php +31 -0
  14. package/tests/benchmark/base/enum-trait-adapt.php.json +965 -0
  15. package/tests/benchmark/base/exprs.php +4 -0
  16. package/tests/benchmark/base/exprs.php.json +811 -0
  17. package/tests/benchmark/base/flow-extras.php +12 -0
  18. package/tests/benchmark/base/flow-extras.php.json +897 -0
  19. package/tests/benchmark/base/function.php +7 -0
  20. package/tests/benchmark/base/function.php.json +536 -0
  21. package/tests/benchmark/base/modern-php.php +13 -0
  22. package/tests/benchmark/base/modern-php.php.json +508 -0
  23. package/tests/benchmark/base/namespace.php +5 -0
  24. package/tests/benchmark/base/namespace.php.json +307 -0
  25. package/tests/benchmark/base/new-static.php +3 -0
  26. package/tests/benchmark/base/new-static.php.json +399 -0
  27. package/tests/benchmark/base/runtime.php +13 -0
  28. package/tests/benchmark/base/runtime.php.json +1095 -0
  29. package/tests/benchmark/base/strings-casts.php +17 -0
  30. package/tests/benchmark/base/strings-casts.php.json +1357 -0
  31. package/tests/benchmark/base/structures.php +26 -0
  32. package/tests/benchmark/base/structures.php.json +1582 -0
  33. package/tests/index.ts +87 -0
@@ -0,0 +1,1623 @@
1
+ {
2
+ "type": "CompileUnit",
3
+ "body": [
4
+ {
5
+ "type": "ClassDefinition",
6
+ "id": {
7
+ "type": "Identifier",
8
+ "name": "Demo",
9
+ "_meta": {
10
+ "loc": {
11
+ "start": {
12
+ "line": 3,
13
+ "column": 7
14
+ },
15
+ "end": {
16
+ "line": 3,
17
+ "column": 11
18
+ },
19
+ "sourcefile": "closure-class.php"
20
+ }
21
+ },
22
+ "loc": {
23
+ "start": {
24
+ "line": 3,
25
+ "column": 7
26
+ },
27
+ "end": {
28
+ "line": 3,
29
+ "column": 11
30
+ },
31
+ "sourcefile": "closure-class.php"
32
+ }
33
+ },
34
+ "body": [
35
+ {
36
+ "type": "VariableDeclaration",
37
+ "id": {
38
+ "type": "Identifier",
39
+ "name": "name",
40
+ "_meta": {
41
+ "loc": {
42
+ "start": {
43
+ "line": 5,
44
+ "column": 12
45
+ },
46
+ "end": {
47
+ "line": 5,
48
+ "column": 17
49
+ },
50
+ "sourcefile": "closure-class.php"
51
+ }
52
+ },
53
+ "loc": {
54
+ "start": {
55
+ "line": 5,
56
+ "column": 12
57
+ },
58
+ "end": {
59
+ "line": 5,
60
+ "column": 17
61
+ },
62
+ "sourcefile": "closure-class.php"
63
+ }
64
+ },
65
+ "init": {
66
+ "type": "Literal",
67
+ "value": "x",
68
+ "literalType": "string",
69
+ "_meta": {
70
+ "loc": {
71
+ "start": {
72
+ "line": 5,
73
+ "column": 20
74
+ },
75
+ "end": {
76
+ "line": 5,
77
+ "column": 23
78
+ },
79
+ "sourcefile": "closure-class.php"
80
+ }
81
+ },
82
+ "loc": {
83
+ "start": {
84
+ "line": 5,
85
+ "column": 20
86
+ },
87
+ "end": {
88
+ "line": 5,
89
+ "column": 23
90
+ },
91
+ "sourcefile": "closure-class.php"
92
+ }
93
+ },
94
+ "cloned": false,
95
+ "varType": {
96
+ "type": "DynamicType",
97
+ "id": null,
98
+ "_meta": {}
99
+ },
100
+ "_meta": {
101
+ "visibility": "public",
102
+ "isStatic": false,
103
+ "readonly": false,
104
+ "loc": {
105
+ "start": {
106
+ "line": 5,
107
+ "column": 12
108
+ },
109
+ "end": {
110
+ "line": 5,
111
+ "column": 23
112
+ },
113
+ "sourcefile": "closure-class.php"
114
+ }
115
+ },
116
+ "loc": {
117
+ "start": {
118
+ "line": 5,
119
+ "column": 12
120
+ },
121
+ "end": {
122
+ "line": 5,
123
+ "column": 23
124
+ },
125
+ "sourcefile": "closure-class.php"
126
+ }
127
+ },
128
+ {
129
+ "type": "VariableDeclaration",
130
+ "id": {
131
+ "type": "Identifier",
132
+ "name": "count",
133
+ "_meta": {
134
+ "loc": {
135
+ "start": {
136
+ "line": 6,
137
+ "column": 20
138
+ },
139
+ "end": {
140
+ "line": 6,
141
+ "column": 26
142
+ },
143
+ "sourcefile": "closure-class.php"
144
+ }
145
+ },
146
+ "loc": {
147
+ "start": {
148
+ "line": 6,
149
+ "column": 20
150
+ },
151
+ "end": {
152
+ "line": 6,
153
+ "column": 26
154
+ },
155
+ "sourcefile": "closure-class.php"
156
+ }
157
+ },
158
+ "init": {
159
+ "type": "Literal",
160
+ "value": 1,
161
+ "literalType": "number",
162
+ "_meta": {
163
+ "loc": {
164
+ "start": {
165
+ "line": 6,
166
+ "column": 29
167
+ },
168
+ "end": {
169
+ "line": 6,
170
+ "column": 30
171
+ },
172
+ "sourcefile": "closure-class.php"
173
+ }
174
+ },
175
+ "loc": {
176
+ "start": {
177
+ "line": 6,
178
+ "column": 29
179
+ },
180
+ "end": {
181
+ "line": 6,
182
+ "column": 30
183
+ },
184
+ "sourcefile": "closure-class.php"
185
+ }
186
+ },
187
+ "cloned": false,
188
+ "varType": {
189
+ "type": "DynamicType",
190
+ "id": null,
191
+ "_meta": {}
192
+ },
193
+ "_meta": {
194
+ "visibility": "private",
195
+ "isStatic": true,
196
+ "readonly": false,
197
+ "loc": {
198
+ "start": {
199
+ "line": 6,
200
+ "column": 20
201
+ },
202
+ "end": {
203
+ "line": 6,
204
+ "column": 30
205
+ },
206
+ "sourcefile": "closure-class.php"
207
+ }
208
+ },
209
+ "loc": {
210
+ "start": {
211
+ "line": 6,
212
+ "column": 20
213
+ },
214
+ "end": {
215
+ "line": 6,
216
+ "column": 30
217
+ },
218
+ "sourcefile": "closure-class.php"
219
+ }
220
+ },
221
+ {
222
+ "type": "VariableDeclaration",
223
+ "id": {
224
+ "type": "Identifier",
225
+ "name": "DEFAULT_COUNT",
226
+ "_meta": {
227
+ "loc": {
228
+ "start": {
229
+ "line": 7,
230
+ "column": 11
231
+ },
232
+ "end": {
233
+ "line": 7,
234
+ "column": 24
235
+ },
236
+ "sourcefile": "closure-class.php"
237
+ }
238
+ },
239
+ "loc": {
240
+ "start": {
241
+ "line": 7,
242
+ "column": 11
243
+ },
244
+ "end": {
245
+ "line": 7,
246
+ "column": 24
247
+ },
248
+ "sourcefile": "closure-class.php"
249
+ }
250
+ },
251
+ "init": {
252
+ "type": "Literal",
253
+ "value": 2,
254
+ "literalType": "number",
255
+ "_meta": {
256
+ "loc": {
257
+ "start": {
258
+ "line": 7,
259
+ "column": 27
260
+ },
261
+ "end": {
262
+ "line": 7,
263
+ "column": 28
264
+ },
265
+ "sourcefile": "closure-class.php"
266
+ }
267
+ },
268
+ "loc": {
269
+ "start": {
270
+ "line": 7,
271
+ "column": 27
272
+ },
273
+ "end": {
274
+ "line": 7,
275
+ "column": 28
276
+ },
277
+ "sourcefile": "closure-class.php"
278
+ }
279
+ },
280
+ "cloned": false,
281
+ "varType": {
282
+ "type": "DynamicType",
283
+ "id": null,
284
+ "_meta": {}
285
+ },
286
+ "_meta": {
287
+ "constant": true,
288
+ "loc": {
289
+ "start": {
290
+ "line": 7,
291
+ "column": 11
292
+ },
293
+ "end": {
294
+ "line": 7,
295
+ "column": 28
296
+ },
297
+ "sourcefile": "closure-class.php"
298
+ }
299
+ },
300
+ "loc": {
301
+ "start": {
302
+ "line": 7,
303
+ "column": 11
304
+ },
305
+ "end": {
306
+ "line": 7,
307
+ "column": 28
308
+ },
309
+ "sourcefile": "closure-class.php"
310
+ }
311
+ },
312
+ {
313
+ "type": "FunctionDefinition",
314
+ "id": {
315
+ "type": "Identifier",
316
+ "name": "build",
317
+ "_meta": {
318
+ "loc": {
319
+ "start": {
320
+ "line": 9,
321
+ "column": 21
322
+ },
323
+ "end": {
324
+ "line": 9,
325
+ "column": 26
326
+ },
327
+ "sourcefile": "closure-class.php"
328
+ }
329
+ },
330
+ "loc": {
331
+ "start": {
332
+ "line": 9,
333
+ "column": 21
334
+ },
335
+ "end": {
336
+ "line": 9,
337
+ "column": 26
338
+ },
339
+ "sourcefile": "closure-class.php"
340
+ }
341
+ },
342
+ "parameters": [
343
+ {
344
+ "type": "VariableDeclaration",
345
+ "id": {
346
+ "type": "Identifier",
347
+ "name": "input",
348
+ "_meta": {
349
+ "loc": {
350
+ "start": {
351
+ "line": 9,
352
+ "column": 27
353
+ },
354
+ "end": {
355
+ "line": 9,
356
+ "column": 33
357
+ },
358
+ "sourcefile": "closure-class.php"
359
+ }
360
+ },
361
+ "loc": {
362
+ "start": {
363
+ "line": 9,
364
+ "column": 27
365
+ },
366
+ "end": {
367
+ "line": 9,
368
+ "column": 33
369
+ },
370
+ "sourcefile": "closure-class.php"
371
+ }
372
+ },
373
+ "init": null,
374
+ "cloned": false,
375
+ "varType": {
376
+ "type": "DynamicType",
377
+ "id": null,
378
+ "_meta": {}
379
+ },
380
+ "_meta": {
381
+ "variadic": false,
382
+ "loc": {
383
+ "start": {
384
+ "line": 9,
385
+ "column": 27
386
+ },
387
+ "end": {
388
+ "line": 9,
389
+ "column": 33
390
+ },
391
+ "sourcefile": "closure-class.php"
392
+ }
393
+ },
394
+ "loc": {
395
+ "start": {
396
+ "line": 9,
397
+ "column": 27
398
+ },
399
+ "end": {
400
+ "line": 9,
401
+ "column": 33
402
+ },
403
+ "sourcefile": "closure-class.php"
404
+ }
405
+ }
406
+ ],
407
+ "returnType": {
408
+ "type": "DynamicType",
409
+ "id": null,
410
+ "_meta": {}
411
+ },
412
+ "body": {
413
+ "type": "ScopedStatement",
414
+ "body": [
415
+ {
416
+ "type": "ExpressionStatement",
417
+ "expression": {
418
+ "type": "AssignmentExpression",
419
+ "left": {
420
+ "type": "Identifier",
421
+ "name": "handler",
422
+ "_meta": {
423
+ "loc": {
424
+ "start": {
425
+ "line": 11,
426
+ "column": 9
427
+ },
428
+ "end": {
429
+ "line": 11,
430
+ "column": 17
431
+ },
432
+ "sourcefile": "closure-class.php"
433
+ }
434
+ },
435
+ "loc": {
436
+ "start": {
437
+ "line": 11,
438
+ "column": 9
439
+ },
440
+ "end": {
441
+ "line": 11,
442
+ "column": 17
443
+ },
444
+ "sourcefile": "closure-class.php"
445
+ }
446
+ },
447
+ "right": {
448
+ "type": "FunctionDefinition",
449
+ "id": null,
450
+ "parameters": [
451
+ {
452
+ "type": "VariableDeclaration",
453
+ "id": {
454
+ "type": "Identifier",
455
+ "name": "x",
456
+ "_meta": {
457
+ "loc": {
458
+ "start": {
459
+ "line": 11,
460
+ "column": 30
461
+ },
462
+ "end": {
463
+ "line": 11,
464
+ "column": 32
465
+ },
466
+ "sourcefile": "closure-class.php"
467
+ }
468
+ },
469
+ "loc": {
470
+ "start": {
471
+ "line": 11,
472
+ "column": 30
473
+ },
474
+ "end": {
475
+ "line": 11,
476
+ "column": 32
477
+ },
478
+ "sourcefile": "closure-class.php"
479
+ }
480
+ },
481
+ "init": null,
482
+ "cloned": false,
483
+ "varType": {
484
+ "type": "DynamicType",
485
+ "id": null,
486
+ "_meta": {}
487
+ },
488
+ "_meta": {
489
+ "variadic": false,
490
+ "loc": {
491
+ "start": {
492
+ "line": 11,
493
+ "column": 30
494
+ },
495
+ "end": {
496
+ "line": 11,
497
+ "column": 32
498
+ },
499
+ "sourcefile": "closure-class.php"
500
+ }
501
+ },
502
+ "loc": {
503
+ "start": {
504
+ "line": 11,
505
+ "column": 30
506
+ },
507
+ "end": {
508
+ "line": 11,
509
+ "column": 32
510
+ },
511
+ "sourcefile": "closure-class.php"
512
+ }
513
+ }
514
+ ],
515
+ "returnType": {
516
+ "type": "DynamicType",
517
+ "id": null,
518
+ "_meta": {}
519
+ },
520
+ "body": {
521
+ "type": "ScopedStatement",
522
+ "body": [
523
+ {
524
+ "type": "ReturnStatement",
525
+ "argument": {
526
+ "type": "BinaryExpression",
527
+ "operator": "+",
528
+ "left": {
529
+ "type": "Identifier",
530
+ "name": "x",
531
+ "_meta": {
532
+ "loc": {
533
+ "start": {
534
+ "line": 12,
535
+ "column": 20
536
+ },
537
+ "end": {
538
+ "line": 12,
539
+ "column": 22
540
+ },
541
+ "sourcefile": "closure-class.php"
542
+ }
543
+ },
544
+ "loc": {
545
+ "start": {
546
+ "line": 12,
547
+ "column": 20
548
+ },
549
+ "end": {
550
+ "line": 12,
551
+ "column": 22
552
+ },
553
+ "sourcefile": "closure-class.php"
554
+ }
555
+ },
556
+ "right": {
557
+ "type": "Identifier",
558
+ "name": "input",
559
+ "_meta": {
560
+ "loc": {
561
+ "start": {
562
+ "line": 12,
563
+ "column": 25
564
+ },
565
+ "end": {
566
+ "line": 12,
567
+ "column": 31
568
+ },
569
+ "sourcefile": "closure-class.php"
570
+ }
571
+ },
572
+ "loc": {
573
+ "start": {
574
+ "line": 12,
575
+ "column": 25
576
+ },
577
+ "end": {
578
+ "line": 12,
579
+ "column": 31
580
+ },
581
+ "sourcefile": "closure-class.php"
582
+ }
583
+ },
584
+ "_meta": {
585
+ "loc": {
586
+ "start": {
587
+ "line": 12,
588
+ "column": 20
589
+ },
590
+ "end": {
591
+ "line": 12,
592
+ "column": 31
593
+ },
594
+ "sourcefile": "closure-class.php"
595
+ }
596
+ },
597
+ "loc": {
598
+ "start": {
599
+ "line": 12,
600
+ "column": 20
601
+ },
602
+ "end": {
603
+ "line": 12,
604
+ "column": 31
605
+ },
606
+ "sourcefile": "closure-class.php"
607
+ }
608
+ },
609
+ "isYield": false,
610
+ "_meta": {
611
+ "loc": {
612
+ "start": {
613
+ "line": 12,
614
+ "column": 13
615
+ },
616
+ "end": {
617
+ "line": 12,
618
+ "column": 32
619
+ },
620
+ "sourcefile": "closure-class.php"
621
+ }
622
+ },
623
+ "loc": {
624
+ "start": {
625
+ "line": 12,
626
+ "column": 13
627
+ },
628
+ "end": {
629
+ "line": 12,
630
+ "column": 32
631
+ },
632
+ "sourcefile": "closure-class.php"
633
+ }
634
+ }
635
+ ],
636
+ "id": null,
637
+ "_meta": {
638
+ "loc": {
639
+ "start": {
640
+ "line": 11,
641
+ "column": 47
642
+ },
643
+ "end": {
644
+ "line": 13,
645
+ "column": 10
646
+ },
647
+ "sourcefile": "closure-class.php"
648
+ }
649
+ },
650
+ "loc": {
651
+ "start": {
652
+ "line": 11,
653
+ "column": 47
654
+ },
655
+ "end": {
656
+ "line": 13,
657
+ "column": 10
658
+ },
659
+ "sourcefile": "closure-class.php"
660
+ }
661
+ },
662
+ "modifiers": [],
663
+ "_meta": {
664
+ "loc": {
665
+ "start": {
666
+ "line": 11,
667
+ "column": 20
668
+ },
669
+ "end": {
670
+ "line": 13,
671
+ "column": 10
672
+ },
673
+ "sourcefile": "closure-class.php"
674
+ },
675
+ "uses": [
676
+ {
677
+ "type": "Identifier",
678
+ "name": "input",
679
+ "_meta": {
680
+ "loc": {
681
+ "start": {
682
+ "line": 11,
683
+ "column": 39
684
+ },
685
+ "end": {
686
+ "line": 11,
687
+ "column": 45
688
+ },
689
+ "sourcefile": "closure-class.php"
690
+ }
691
+ },
692
+ "loc": {
693
+ "start": {
694
+ "line": 11,
695
+ "column": 39
696
+ },
697
+ "end": {
698
+ "line": 11,
699
+ "column": 45
700
+ },
701
+ "sourcefile": "closure-class.php"
702
+ }
703
+ }
704
+ ]
705
+ },
706
+ "loc": {
707
+ "start": {
708
+ "line": 11,
709
+ "column": 20
710
+ },
711
+ "end": {
712
+ "line": 13,
713
+ "column": 10
714
+ },
715
+ "sourcefile": "closure-class.php"
716
+ }
717
+ },
718
+ "operator": "=",
719
+ "cloned": false,
720
+ "_meta": {
721
+ "loc": {
722
+ "start": {
723
+ "line": 11,
724
+ "column": 9
725
+ },
726
+ "end": {
727
+ "line": 13,
728
+ "column": 10
729
+ },
730
+ "sourcefile": "closure-class.php"
731
+ }
732
+ },
733
+ "loc": {
734
+ "start": {
735
+ "line": 11,
736
+ "column": 9
737
+ },
738
+ "end": {
739
+ "line": 13,
740
+ "column": 10
741
+ },
742
+ "sourcefile": "closure-class.php"
743
+ }
744
+ },
745
+ "_meta": {
746
+ "loc": {
747
+ "start": {
748
+ "line": 11,
749
+ "column": 9
750
+ },
751
+ "end": {
752
+ "line": 13,
753
+ "column": 11
754
+ },
755
+ "sourcefile": "closure-class.php"
756
+ }
757
+ },
758
+ "loc": {
759
+ "start": {
760
+ "line": 11,
761
+ "column": 9
762
+ },
763
+ "end": {
764
+ "line": 13,
765
+ "column": 11
766
+ },
767
+ "sourcefile": "closure-class.php"
768
+ }
769
+ },
770
+ {
771
+ "type": "ExpressionStatement",
772
+ "expression": {
773
+ "type": "AssignmentExpression",
774
+ "left": {
775
+ "type": "Identifier",
776
+ "name": "alias",
777
+ "_meta": {
778
+ "loc": {
779
+ "start": {
780
+ "line": 15,
781
+ "column": 9
782
+ },
783
+ "end": {
784
+ "line": 15,
785
+ "column": 15
786
+ },
787
+ "sourcefile": "closure-class.php"
788
+ }
789
+ },
790
+ "loc": {
791
+ "start": {
792
+ "line": 15,
793
+ "column": 9
794
+ },
795
+ "end": {
796
+ "line": 15,
797
+ "column": 15
798
+ },
799
+ "sourcefile": "closure-class.php"
800
+ }
801
+ },
802
+ "right": {
803
+ "type": "Identifier",
804
+ "name": "input",
805
+ "_meta": {
806
+ "loc": {
807
+ "start": {
808
+ "line": 15,
809
+ "column": 19
810
+ },
811
+ "end": {
812
+ "line": 15,
813
+ "column": 25
814
+ },
815
+ "sourcefile": "closure-class.php"
816
+ }
817
+ },
818
+ "loc": {
819
+ "start": {
820
+ "line": 15,
821
+ "column": 19
822
+ },
823
+ "end": {
824
+ "line": 15,
825
+ "column": 25
826
+ },
827
+ "sourcefile": "closure-class.php"
828
+ }
829
+ },
830
+ "operator": "=",
831
+ "cloned": true,
832
+ "_meta": {
833
+ "byref": true,
834
+ "loc": {
835
+ "start": {
836
+ "line": 15,
837
+ "column": 9
838
+ },
839
+ "end": {
840
+ "line": 15,
841
+ "column": 25
842
+ },
843
+ "sourcefile": "closure-class.php"
844
+ }
845
+ },
846
+ "loc": {
847
+ "start": {
848
+ "line": 15,
849
+ "column": 9
850
+ },
851
+ "end": {
852
+ "line": 15,
853
+ "column": 25
854
+ },
855
+ "sourcefile": "closure-class.php"
856
+ }
857
+ },
858
+ "_meta": {
859
+ "loc": {
860
+ "start": {
861
+ "line": 15,
862
+ "column": 9
863
+ },
864
+ "end": {
865
+ "line": 15,
866
+ "column": 26
867
+ },
868
+ "sourcefile": "closure-class.php"
869
+ }
870
+ },
871
+ "loc": {
872
+ "start": {
873
+ "line": 15,
874
+ "column": 9
875
+ },
876
+ "end": {
877
+ "line": 15,
878
+ "column": 26
879
+ },
880
+ "sourcefile": "closure-class.php"
881
+ }
882
+ },
883
+ {
884
+ "type": "ExpressionStatement",
885
+ "expression": {
886
+ "type": "AssignmentExpression",
887
+ "left": {
888
+ "type": "Identifier",
889
+ "name": "copy",
890
+ "_meta": {
891
+ "loc": {
892
+ "start": {
893
+ "line": 16,
894
+ "column": 9
895
+ },
896
+ "end": {
897
+ "line": 16,
898
+ "column": 14
899
+ },
900
+ "sourcefile": "closure-class.php"
901
+ }
902
+ },
903
+ "loc": {
904
+ "start": {
905
+ "line": 16,
906
+ "column": 9
907
+ },
908
+ "end": {
909
+ "line": 16,
910
+ "column": 14
911
+ },
912
+ "sourcefile": "closure-class.php"
913
+ }
914
+ },
915
+ "right": {
916
+ "type": "CallExpression",
917
+ "callee": {
918
+ "type": "Identifier",
919
+ "name": "clone",
920
+ "_meta": {}
921
+ },
922
+ "arguments": [
923
+ {
924
+ "type": "Identifier",
925
+ "name": "this",
926
+ "_meta": {
927
+ "loc": {
928
+ "start": {
929
+ "line": 16,
930
+ "column": 23
931
+ },
932
+ "end": {
933
+ "line": 16,
934
+ "column": 28
935
+ },
936
+ "sourcefile": "closure-class.php"
937
+ }
938
+ },
939
+ "loc": {
940
+ "start": {
941
+ "line": 16,
942
+ "column": 23
943
+ },
944
+ "end": {
945
+ "line": 16,
946
+ "column": 28
947
+ },
948
+ "sourcefile": "closure-class.php"
949
+ }
950
+ }
951
+ ],
952
+ "_meta": {
953
+ "loc": {
954
+ "start": {
955
+ "line": 16,
956
+ "column": 17
957
+ },
958
+ "end": {
959
+ "line": 16,
960
+ "column": 28
961
+ },
962
+ "sourcefile": "closure-class.php"
963
+ }
964
+ },
965
+ "loc": {
966
+ "start": {
967
+ "line": 16,
968
+ "column": 17
969
+ },
970
+ "end": {
971
+ "line": 16,
972
+ "column": 28
973
+ },
974
+ "sourcefile": "closure-class.php"
975
+ }
976
+ },
977
+ "operator": "=",
978
+ "cloned": false,
979
+ "_meta": {
980
+ "loc": {
981
+ "start": {
982
+ "line": 16,
983
+ "column": 9
984
+ },
985
+ "end": {
986
+ "line": 16,
987
+ "column": 28
988
+ },
989
+ "sourcefile": "closure-class.php"
990
+ }
991
+ },
992
+ "loc": {
993
+ "start": {
994
+ "line": 16,
995
+ "column": 9
996
+ },
997
+ "end": {
998
+ "line": 16,
999
+ "column": 28
1000
+ },
1001
+ "sourcefile": "closure-class.php"
1002
+ }
1003
+ },
1004
+ "_meta": {
1005
+ "loc": {
1006
+ "start": {
1007
+ "line": 16,
1008
+ "column": 9
1009
+ },
1010
+ "end": {
1011
+ "line": 16,
1012
+ "column": 29
1013
+ },
1014
+ "sourcefile": "closure-class.php"
1015
+ }
1016
+ },
1017
+ "loc": {
1018
+ "start": {
1019
+ "line": 16,
1020
+ "column": 9
1021
+ },
1022
+ "end": {
1023
+ "line": 16,
1024
+ "column": 29
1025
+ },
1026
+ "sourcefile": "closure-class.php"
1027
+ }
1028
+ },
1029
+ {
1030
+ "type": "IfStatement",
1031
+ "test": {
1032
+ "type": "BinaryExpression",
1033
+ "operator": "&&",
1034
+ "left": {
1035
+ "type": "CallExpression",
1036
+ "callee": {
1037
+ "type": "Identifier",
1038
+ "name": "isset",
1039
+ "_meta": {
1040
+ "loc": {
1041
+ "start": {
1042
+ "line": 18,
1043
+ "column": 13
1044
+ },
1045
+ "end": {
1046
+ "line": 18,
1047
+ "column": 18
1048
+ },
1049
+ "sourcefile": "closure-class.php"
1050
+ }
1051
+ },
1052
+ "loc": {
1053
+ "start": {
1054
+ "line": 18,
1055
+ "column": 13
1056
+ },
1057
+ "end": {
1058
+ "line": 18,
1059
+ "column": 18
1060
+ },
1061
+ "sourcefile": "closure-class.php"
1062
+ }
1063
+ },
1064
+ "arguments": [
1065
+ {
1066
+ "type": "Identifier",
1067
+ "name": "alias",
1068
+ "_meta": {
1069
+ "loc": {
1070
+ "start": {
1071
+ "line": 18,
1072
+ "column": 19
1073
+ },
1074
+ "end": {
1075
+ "line": 18,
1076
+ "column": 25
1077
+ },
1078
+ "sourcefile": "closure-class.php"
1079
+ }
1080
+ },
1081
+ "loc": {
1082
+ "start": {
1083
+ "line": 18,
1084
+ "column": 19
1085
+ },
1086
+ "end": {
1087
+ "line": 18,
1088
+ "column": 25
1089
+ },
1090
+ "sourcefile": "closure-class.php"
1091
+ }
1092
+ },
1093
+ {
1094
+ "type": "Identifier",
1095
+ "name": "copy",
1096
+ "_meta": {
1097
+ "loc": {
1098
+ "start": {
1099
+ "line": 18,
1100
+ "column": 27
1101
+ },
1102
+ "end": {
1103
+ "line": 18,
1104
+ "column": 32
1105
+ },
1106
+ "sourcefile": "closure-class.php"
1107
+ }
1108
+ },
1109
+ "loc": {
1110
+ "start": {
1111
+ "line": 18,
1112
+ "column": 27
1113
+ },
1114
+ "end": {
1115
+ "line": 18,
1116
+ "column": 32
1117
+ },
1118
+ "sourcefile": "closure-class.php"
1119
+ }
1120
+ }
1121
+ ],
1122
+ "_meta": {
1123
+ "loc": {
1124
+ "start": {
1125
+ "line": 18,
1126
+ "column": 13
1127
+ },
1128
+ "end": {
1129
+ "line": 18,
1130
+ "column": 33
1131
+ },
1132
+ "sourcefile": "closure-class.php"
1133
+ }
1134
+ },
1135
+ "loc": {
1136
+ "start": {
1137
+ "line": 18,
1138
+ "column": 13
1139
+ },
1140
+ "end": {
1141
+ "line": 18,
1142
+ "column": 33
1143
+ },
1144
+ "sourcefile": "closure-class.php"
1145
+ }
1146
+ },
1147
+ "right": {
1148
+ "type": "UnaryExpression",
1149
+ "operator": "!",
1150
+ "argument": {
1151
+ "type": "CallExpression",
1152
+ "callee": {
1153
+ "type": "Identifier",
1154
+ "name": "empty",
1155
+ "_meta": {
1156
+ "loc": {
1157
+ "start": {
1158
+ "line": 18,
1159
+ "column": 38
1160
+ },
1161
+ "end": {
1162
+ "line": 18,
1163
+ "column": 43
1164
+ },
1165
+ "sourcefile": "closure-class.php"
1166
+ }
1167
+ },
1168
+ "loc": {
1169
+ "start": {
1170
+ "line": 18,
1171
+ "column": 38
1172
+ },
1173
+ "end": {
1174
+ "line": 18,
1175
+ "column": 43
1176
+ },
1177
+ "sourcefile": "closure-class.php"
1178
+ }
1179
+ },
1180
+ "arguments": [
1181
+ {
1182
+ "type": "Identifier",
1183
+ "name": "input",
1184
+ "_meta": {
1185
+ "loc": {
1186
+ "start": {
1187
+ "line": 18,
1188
+ "column": 44
1189
+ },
1190
+ "end": {
1191
+ "line": 18,
1192
+ "column": 50
1193
+ },
1194
+ "sourcefile": "closure-class.php"
1195
+ }
1196
+ },
1197
+ "loc": {
1198
+ "start": {
1199
+ "line": 18,
1200
+ "column": 44
1201
+ },
1202
+ "end": {
1203
+ "line": 18,
1204
+ "column": 50
1205
+ },
1206
+ "sourcefile": "closure-class.php"
1207
+ }
1208
+ }
1209
+ ],
1210
+ "_meta": {
1211
+ "loc": {
1212
+ "start": {
1213
+ "line": 18,
1214
+ "column": 38
1215
+ },
1216
+ "end": {
1217
+ "line": 18,
1218
+ "column": 51
1219
+ },
1220
+ "sourcefile": "closure-class.php"
1221
+ }
1222
+ },
1223
+ "loc": {
1224
+ "start": {
1225
+ "line": 18,
1226
+ "column": 38
1227
+ },
1228
+ "end": {
1229
+ "line": 18,
1230
+ "column": 51
1231
+ },
1232
+ "sourcefile": "closure-class.php"
1233
+ }
1234
+ },
1235
+ "isSuffix": false,
1236
+ "_meta": {
1237
+ "loc": {
1238
+ "start": {
1239
+ "line": 18,
1240
+ "column": 37
1241
+ },
1242
+ "end": {
1243
+ "line": 18,
1244
+ "column": 51
1245
+ },
1246
+ "sourcefile": "closure-class.php"
1247
+ }
1248
+ },
1249
+ "loc": {
1250
+ "start": {
1251
+ "line": 18,
1252
+ "column": 37
1253
+ },
1254
+ "end": {
1255
+ "line": 18,
1256
+ "column": 51
1257
+ },
1258
+ "sourcefile": "closure-class.php"
1259
+ }
1260
+ },
1261
+ "_meta": {
1262
+ "loc": {
1263
+ "start": {
1264
+ "line": 18,
1265
+ "column": 13
1266
+ },
1267
+ "end": {
1268
+ "line": 18,
1269
+ "column": 51
1270
+ },
1271
+ "sourcefile": "closure-class.php"
1272
+ }
1273
+ },
1274
+ "loc": {
1275
+ "start": {
1276
+ "line": 18,
1277
+ "column": 13
1278
+ },
1279
+ "end": {
1280
+ "line": 18,
1281
+ "column": 51
1282
+ },
1283
+ "sourcefile": "closure-class.php"
1284
+ }
1285
+ },
1286
+ "consequent": {
1287
+ "type": "ScopedStatement",
1288
+ "body": [
1289
+ {
1290
+ "type": "ReturnStatement",
1291
+ "argument": {
1292
+ "type": "CallExpression",
1293
+ "callee": {
1294
+ "type": "Identifier",
1295
+ "name": "handler",
1296
+ "_meta": {
1297
+ "loc": {
1298
+ "start": {
1299
+ "line": 19,
1300
+ "column": 20
1301
+ },
1302
+ "end": {
1303
+ "line": 19,
1304
+ "column": 28
1305
+ },
1306
+ "sourcefile": "closure-class.php"
1307
+ }
1308
+ },
1309
+ "loc": {
1310
+ "start": {
1311
+ "line": 19,
1312
+ "column": 20
1313
+ },
1314
+ "end": {
1315
+ "line": 19,
1316
+ "column": 28
1317
+ },
1318
+ "sourcefile": "closure-class.php"
1319
+ }
1320
+ },
1321
+ "arguments": [
1322
+ {
1323
+ "type": "Identifier",
1324
+ "name": "alias",
1325
+ "_meta": {
1326
+ "loc": {
1327
+ "start": {
1328
+ "line": 19,
1329
+ "column": 29
1330
+ },
1331
+ "end": {
1332
+ "line": 19,
1333
+ "column": 35
1334
+ },
1335
+ "sourcefile": "closure-class.php"
1336
+ }
1337
+ },
1338
+ "loc": {
1339
+ "start": {
1340
+ "line": 19,
1341
+ "column": 29
1342
+ },
1343
+ "end": {
1344
+ "line": 19,
1345
+ "column": 35
1346
+ },
1347
+ "sourcefile": "closure-class.php"
1348
+ }
1349
+ }
1350
+ ],
1351
+ "_meta": {
1352
+ "loc": {
1353
+ "start": {
1354
+ "line": 19,
1355
+ "column": 20
1356
+ },
1357
+ "end": {
1358
+ "line": 19,
1359
+ "column": 36
1360
+ },
1361
+ "sourcefile": "closure-class.php"
1362
+ }
1363
+ },
1364
+ "loc": {
1365
+ "start": {
1366
+ "line": 19,
1367
+ "column": 20
1368
+ },
1369
+ "end": {
1370
+ "line": 19,
1371
+ "column": 36
1372
+ },
1373
+ "sourcefile": "closure-class.php"
1374
+ }
1375
+ },
1376
+ "isYield": false,
1377
+ "_meta": {
1378
+ "loc": {
1379
+ "start": {
1380
+ "line": 19,
1381
+ "column": 13
1382
+ },
1383
+ "end": {
1384
+ "line": 19,
1385
+ "column": 37
1386
+ },
1387
+ "sourcefile": "closure-class.php"
1388
+ }
1389
+ },
1390
+ "loc": {
1391
+ "start": {
1392
+ "line": 19,
1393
+ "column": 13
1394
+ },
1395
+ "end": {
1396
+ "line": 19,
1397
+ "column": 37
1398
+ },
1399
+ "sourcefile": "closure-class.php"
1400
+ }
1401
+ }
1402
+ ],
1403
+ "id": null,
1404
+ "_meta": {
1405
+ "loc": {
1406
+ "start": {
1407
+ "line": 18,
1408
+ "column": 53
1409
+ },
1410
+ "end": {
1411
+ "line": 20,
1412
+ "column": 10
1413
+ },
1414
+ "sourcefile": "closure-class.php"
1415
+ }
1416
+ },
1417
+ "loc": {
1418
+ "start": {
1419
+ "line": 18,
1420
+ "column": 53
1421
+ },
1422
+ "end": {
1423
+ "line": 20,
1424
+ "column": 10
1425
+ },
1426
+ "sourcefile": "closure-class.php"
1427
+ }
1428
+ },
1429
+ "alternative": null,
1430
+ "_meta": {
1431
+ "loc": {
1432
+ "start": {
1433
+ "line": 18,
1434
+ "column": 9
1435
+ },
1436
+ "end": {
1437
+ "line": 20,
1438
+ "column": 10
1439
+ },
1440
+ "sourcefile": "closure-class.php"
1441
+ }
1442
+ },
1443
+ "loc": {
1444
+ "start": {
1445
+ "line": 18,
1446
+ "column": 9
1447
+ },
1448
+ "end": {
1449
+ "line": 20,
1450
+ "column": 10
1451
+ },
1452
+ "sourcefile": "closure-class.php"
1453
+ }
1454
+ },
1455
+ {
1456
+ "type": "ReturnStatement",
1457
+ "argument": {
1458
+ "type": "Literal",
1459
+ "value": null,
1460
+ "literalType": "null",
1461
+ "_meta": {
1462
+ "loc": {
1463
+ "start": {
1464
+ "line": 22,
1465
+ "column": 16
1466
+ },
1467
+ "end": {
1468
+ "line": 22,
1469
+ "column": 20
1470
+ },
1471
+ "sourcefile": "closure-class.php"
1472
+ }
1473
+ },
1474
+ "loc": {
1475
+ "start": {
1476
+ "line": 22,
1477
+ "column": 16
1478
+ },
1479
+ "end": {
1480
+ "line": 22,
1481
+ "column": 20
1482
+ },
1483
+ "sourcefile": "closure-class.php"
1484
+ }
1485
+ },
1486
+ "isYield": false,
1487
+ "_meta": {
1488
+ "loc": {
1489
+ "start": {
1490
+ "line": 22,
1491
+ "column": 9
1492
+ },
1493
+ "end": {
1494
+ "line": 22,
1495
+ "column": 21
1496
+ },
1497
+ "sourcefile": "closure-class.php"
1498
+ }
1499
+ },
1500
+ "loc": {
1501
+ "start": {
1502
+ "line": 22,
1503
+ "column": 9
1504
+ },
1505
+ "end": {
1506
+ "line": 22,
1507
+ "column": 21
1508
+ },
1509
+ "sourcefile": "closure-class.php"
1510
+ }
1511
+ }
1512
+ ],
1513
+ "id": null,
1514
+ "_meta": {
1515
+ "loc": {
1516
+ "start": {
1517
+ "line": 10,
1518
+ "column": 5
1519
+ },
1520
+ "end": {
1521
+ "line": 23,
1522
+ "column": 6
1523
+ },
1524
+ "sourcefile": "closure-class.php"
1525
+ }
1526
+ },
1527
+ "loc": {
1528
+ "start": {
1529
+ "line": 10,
1530
+ "column": 5
1531
+ },
1532
+ "end": {
1533
+ "line": 23,
1534
+ "column": 6
1535
+ },
1536
+ "sourcefile": "closure-class.php"
1537
+ }
1538
+ },
1539
+ "modifiers": [
1540
+ "public"
1541
+ ],
1542
+ "_meta": {
1543
+ "loc": {
1544
+ "start": {
1545
+ "line": 9,
1546
+ "column": 5
1547
+ },
1548
+ "end": {
1549
+ "line": 23,
1550
+ "column": 6
1551
+ },
1552
+ "sourcefile": "closure-class.php"
1553
+ }
1554
+ },
1555
+ "loc": {
1556
+ "start": {
1557
+ "line": 9,
1558
+ "column": 5
1559
+ },
1560
+ "end": {
1561
+ "line": 23,
1562
+ "column": 6
1563
+ },
1564
+ "sourcefile": "closure-class.php"
1565
+ }
1566
+ }
1567
+ ],
1568
+ "supers": [],
1569
+ "_meta": {
1570
+ "loc": {
1571
+ "start": {
1572
+ "line": 3,
1573
+ "column": 1
1574
+ },
1575
+ "end": {
1576
+ "line": 24,
1577
+ "column": 2
1578
+ },
1579
+ "sourcefile": "closure-class.php"
1580
+ }
1581
+ },
1582
+ "loc": {
1583
+ "start": {
1584
+ "line": 3,
1585
+ "column": 1
1586
+ },
1587
+ "end": {
1588
+ "line": 24,
1589
+ "column": 2
1590
+ },
1591
+ "sourcefile": "closure-class.php"
1592
+ }
1593
+ }
1594
+ ],
1595
+ "language": "php",
1596
+ "languageVersion": null,
1597
+ "uri": "closure-class.php",
1598
+ "version": "0.0.0",
1599
+ "_meta": {
1600
+ "loc": {
1601
+ "start": {
1602
+ "line": 1,
1603
+ "column": 1
1604
+ },
1605
+ "end": {
1606
+ "line": 25,
1607
+ "column": 1
1608
+ },
1609
+ "sourcefile": "closure-class.php"
1610
+ }
1611
+ },
1612
+ "loc": {
1613
+ "start": {
1614
+ "line": 1,
1615
+ "column": 1
1616
+ },
1617
+ "end": {
1618
+ "line": 25,
1619
+ "column": 1
1620
+ },
1621
+ "sourcefile": "closure-class.php"
1622
+ }
1623
+ }