@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.
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +26 -0
- package/src/parser.ts +1234 -0
- package/tests/benchmark/base/advanced.php +20 -0
- package/tests/benchmark/base/advanced.php.json +1269 -0
- package/tests/benchmark/base/basic.php +3 -0
- package/tests/benchmark/base/basic.php.json +292 -0
- package/tests/benchmark/base/closure-class.php +24 -0
- package/tests/benchmark/base/closure-class.php.json +1623 -0
- package/tests/benchmark/base/control-flow.php +37 -0
- package/tests/benchmark/base/control-flow.php.json +2010 -0
- package/tests/benchmark/base/enum-trait-adapt.php +31 -0
- package/tests/benchmark/base/enum-trait-adapt.php.json +965 -0
- package/tests/benchmark/base/exprs.php +4 -0
- package/tests/benchmark/base/exprs.php.json +811 -0
- package/tests/benchmark/base/flow-extras.php +12 -0
- package/tests/benchmark/base/flow-extras.php.json +897 -0
- package/tests/benchmark/base/function.php +7 -0
- package/tests/benchmark/base/function.php.json +536 -0
- package/tests/benchmark/base/modern-php.php +13 -0
- package/tests/benchmark/base/modern-php.php.json +508 -0
- package/tests/benchmark/base/namespace.php +5 -0
- package/tests/benchmark/base/namespace.php.json +307 -0
- package/tests/benchmark/base/new-static.php +3 -0
- package/tests/benchmark/base/new-static.php.json +399 -0
- package/tests/benchmark/base/runtime.php +13 -0
- package/tests/benchmark/base/runtime.php.json +1095 -0
- package/tests/benchmark/base/strings-casts.php +17 -0
- package/tests/benchmark/base/strings-casts.php.json +1357 -0
- package/tests/benchmark/base/structures.php +26 -0
- package/tests/benchmark/base/structures.php.json +1582 -0
- package/tests/index.ts +87 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
interface Runner
|
|
4
|
+
{
|
|
5
|
+
public function run($x);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
trait HelperTrait
|
|
9
|
+
{
|
|
10
|
+
public function helper()
|
|
11
|
+
{
|
|
12
|
+
return 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function demo()
|
|
17
|
+
{
|
|
18
|
+
global $a, $b;
|
|
19
|
+
static $cache = 1;
|
|
20
|
+
unset($a, $b);
|
|
21
|
+
|
|
22
|
+
[$x, $y] = foo();
|
|
23
|
+
list($m, $n) = bar();
|
|
24
|
+
|
|
25
|
+
return [$x, $y, $m, $n];
|
|
26
|
+
}
|