1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Update XHPAST "expect" test blocks to the new stable, human-readable format

Summary:
Depends on D21065. Ref T13492. Swap existing "expect" blocks from unstable, unreadable JSON to readable, stable trees.

(There are two "INVALID TYPE" outputs which this update effectively detects and which future changes correct.)

Test Plan: Ran "arc unit --everything", got a clean build.

Maniphest Tasks: T13492

Differential Revision: https://secure.phabricator.com/D21066
This commit is contained in:
epriestley 2020-04-07 11:38:26 -07:00
parent 8a7ce97b51
commit a689dee228
28 changed files with 4107 additions and 20515 deletions

View file

@ -11,585 +11,122 @@ $b = new class(10) extends c implements d {
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
64,
[
[
9006,
0,
63,
[
[
9007,
0,
0
],
[
9004,
2,
12,
[
[
9077,
2,
11,
[
[
9047,
2,
2
],
[
9081,
4,
4
],
[
9074,
6,
11,
[
[
9051,
10,
11,
[
[
9005
],
[
9005
],
[
9005
],
[
9005
],
[
9006,
10,
11
]
]
],
[
9005
]
]
]
]
]
]
],
[
9004,
14,
63,
[
[
9077,
14,
62,
[
[
9047,
14,
14
],
[
9081,
16,
16
],
[
9074,
18,
62,
[
[
9051,
25,
62,
[
[
9005
],
[
9005
],
[
9054,
25,
27,
[
[
9090,
27,
27
]
]
],
[
9055,
29,
31,
[
[
9090,
31,
31
]
]
],
[
9006,
33,
62,
[
[
9004,
35,
38,
[
[
9063,
35,
37,
[
[
9070,
35,
35,
[
[
9013,
35,
35
]
]
],
[
9064,
37,
37,
[
[
9047,
37,
37
],
[
9005
]
]
]
]
]
]
],
[
9004,
40,
60,
[
[
9067,
40,
60,
[
[
9068,
40,
40,
[
[
9013,
40,
40
]
]
],
[
9005
],
[
9013,
44,
44
],
[
9059,
45,
47,
[
[
9060,
46,
46,
[
[
9005
],
[
9047,
46,
46
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
49,
60,
[
[
9004,
51,
58,
[
[
9077,
51,
57,
[
[
9092,
51,
53,
[
[
9047,
51,
51
],
[
9013,
53,
53
]
]
],
[
9081,
55,
55
],
[
9047,
57,
57
]
]
]
]
]
]
]
]
]
]
]
]
]
]
],
[
9095,
21,
23,
[
[
9086,
22,
22
]
]
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
302,
3
],
[
377,
1
],
[
358,
5
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
59,
1
],
[
377,
1
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
302,
3
],
[
377,
1
],
[
358,
5
],
[
40,
1
],
[
309,
2
],
[
41,
1
],
[
377,
1
],
[
360,
7
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
361,
10
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
350,
7
],
[
377,
1
],
[
313,
4
],
[
59,
1
],
[
377,
4
],
[
352,
6
],
[
377,
1
],
[
339,
8
],
[
377,
1
],
[
311,
11
],
[
40,
1
],
[
313,
4
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
5
],
[
313,
5
],
[
362,
2
],
[
311,
3
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
313,
4
],
[
59,
1
],
[
377,
3
],
[
125,
1
],
[
377,
1
],
[
125,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $a
> " "
* n_OPERATOR
> =
> " "
* n_NEW
> new
> " "
> class
> " "
* n_CLASS_DECLARATION
* n_EMPTY
* n_EMPTY
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
* n_EMPTY
> ;
> "\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $b
> " "
* n_OPERATOR
> =
> " "
* n_NEW
> new
> " "
> class
> " "
* n_CLASS_DECLARATION
* n_EMPTY
* n_EMPTY
* n_EXTENDS_LIST
> extends
> " "
* n_CLASS_NAME
> c
> " "
* n_IMPLEMENTS_LIST
> implements
> " "
* n_CLASS_NAME
> d
> " "
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_CLASS_MEMBER_DECLARATION_LIST
* n_CLASS_MEMBER_MODIFIER_LIST
* n_STRING
> private
> " "
* n_CLASS_MEMBER_DECLARATION
* n_VARIABLE
> $num
* n_EMPTY
> ;
> "\n\n "
* n_STATEMENT
* n_METHOD_DECLARATION
* n_METHOD_MODIFIER_LIST
* n_STRING
> public
* n_EMPTY
* n_STRING
> __construct
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_EMPTY
* n_VARIABLE
> $num
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_OBJECT_PROPERTY_ACCESS
* n_VARIABLE
> $this
> ->
* n_STRING
> num
> " "
* n_OPERATOR
> =
> " "
* n_VARIABLE
> $num
> ;
> "\n "
> }
> "\n"
> }
* n_CALL_PARAMETER_LIST
> (
* n_NUMERIC_SCALAR
> 10
> )
> ;
> "\n"

View file

@ -2,34 +2,8 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
1,
[
[
9006,
0,
0,
[
[
9007,
0,
0
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n"

View file

@ -2,100 +2,21 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
8,
[
[
9006,
0,
7,
[
[
9007,
0,
0
],
[
9004,
2,
7,
[
[
9099,
2,
6,
[
[
9001,
2,
2
],
[
9095,
3,
6,
[
[
9049,
4,
5,
[
[
9047,
5,
5
]
]
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
38,
1
],
[
313,
2
],
[
41,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> f
* n_CALL_PARAMETER_LIST
> (
* n_VARIABLE_REFERENCE
> &
* n_VARIABLE
> $v
> )
> ;
> "\n"

View file

@ -14,387 +14,80 @@ namespace {
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
45,
[
[
9006,
0,
44,
[
[
9007,
0,
0
],
[
9004,
2,
5,
[
[
9003,
2,
4,
[
[
9001,
4,
4
],
[
9005
]
]
]
]
],
[
9004,
7,
12,
[
[
9051,
7,
12,
[
[
9052,
7,
7
],
[
9090,
9,
9
],
[
9005
],
[
9005
],
[
9006,
11,
12
]
]
]
]
],
[
9004,
14,
31,
[
[
9003,
14,
31,
[
[
9001,
16,
20
],
[
9006,
22,
31,
[
[
9004,
24,
29,
[
[
9051,
24,
29,
[
[
9052,
24,
24
],
[
9090,
26,
26
],
[
9005
],
[
9005
],
[
9006,
28,
29
]
]
]
]
]
]
]
]
]
]
],
[
9004,
33,
44,
[
[
9003,
33,
44,
[
[
9005
],
[
9006,
35,
44,
[
[
9004,
37,
42,
[
[
9051,
37,
42,
[
[
9052,
37,
37
],
[
9090,
39,
39
],
[
9005
],
[
9005
],
[
9006,
41,
42
]
]
]
]
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
386,
9
],
[
377,
1
],
[
311,
1
],
[
59,
1
],
[
377,
2
],
[
358,
5
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
2
],
[
386,
9
],
[
377,
1
],
[
311,
1
],
[
389,
1
],
[
311,
1
],
[
389,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
358,
5
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
386,
9
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
358,
5
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_NAMESPACE
> namespace
> " "
* n_SYMBOL_NAME
> A
* n_EMPTY
> ;
> "\n\n"
* n_STATEMENT
* n_CLASS_DECLARATION
* n_CLASS_ATTRIBUTES
> class
> " "
* n_CLASS_NAME
> B
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n\n"
* n_STATEMENT
* n_NAMESPACE
> namespace
> " "
* n_SYMBOL_NAME
> A
> "\"
> B
> "\"
> C
> " "
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_CLASS_DECLARATION
* n_CLASS_ATTRIBUTES
> class
> " "
* n_CLASS_NAME
> D
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n"
> }
> "\n\n"
* n_STATEMENT
* n_NAMESPACE
* n_EMPTY
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_CLASS_DECLARATION
* n_CLASS_ATTRIBUTES
> class
> " "
* n_CLASS_NAME
> A
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n"
> }
> "\n"

View file

@ -3,124 +3,27 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
12,
[
[
9006,
0,
11,
[
[
9007,
0,
0
],
[
9004,
2,
11,
[
[
9077,
2,
10,
[
[
9086,
2,
2
],
[
9081,
4,
4
],
[
9077,
6,
10,
[
[
9086,
6,
6
],
[
9081,
8,
8
],
[
9086,
10,
10
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
309,
1
],
[
377,
1
],
[
278,
2
],
[
377,
1
],
[
309,
1
],
[
377,
1
],
[
278,
2
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_NUMERIC_SCALAR
> 1
> " "
* n_OPERATOR
> ??
> " "
* n_BINARY_EXPRESSION
* n_NUMERIC_SCALAR
> 2
> " "
* n_OPERATOR
> ??
> " "
* n_NUMERIC_SCALAR
> 3
> ;
> "\n"

View file

@ -3,91 +3,20 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
8,
[
[
9006,
0,
7,
[
[
9007,
0,
0
],
[
9004,
2,
7,
[
[
9077,
2,
6,
[
[
9086,
2,
2
],
[
9081,
4,
4
],
[
9086,
6,
6
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
309,
1
],
[
377,
1
],
[
285,
3
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_NUMERIC_SCALAR
> 1
> " "
* n_OPERATOR
> <=>
> " "
* n_NUMERIC_SCALAR
> 2
> ;
> "\n"

View file

@ -5,278 +5,56 @@ function b(?SomeClass $x) {}
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
27,
[
[
9006,
0,
26,
[
[
9007,
0,
0
],
[
9004,
2,
13,
[
[
9050,
2,
13,
[
[
9005
],
[
9005
],
[
9013,
4,
4
],
[
9059,
5,
10,
[
[
9060,
7,
9,
[
[
9116,
7,
7,
[
[
9090,
7,
7
]
]
],
[
9047,
9,
9
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
12,
13
]
]
]
]
],
[
9004,
15,
26,
[
[
9050,
15,
26,
[
[
9005
],
[
9005
],
[
9013,
17,
17
],
[
9059,
18,
23,
[
[
9060,
20,
22,
[
[
9116,
20,
20,
[
[
9090,
20,
20
]
]
],
[
9047,
22,
22
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
25,
26
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
63,
1
],
[
311,
3
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
63,
1
],
[
311,
9
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> a
* n_DECLARATION_PARAMETER_LIST
> (
> ?
* n_DECLARATION_PARAMETER
* n_NULLABLE_TYPE
* n_CLASS_NAME
> int
> " "
* n_VARIABLE
> $x
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> b
* n_DECLARATION_PARAMETER_LIST
> (
> ?
* n_DECLARATION_PARAMETER
* n_NULLABLE_TYPE
* n_CLASS_NAME
> SomeClass
> " "
* n_VARIABLE
> $x
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n"

View file

@ -16,648 +16,130 @@ $e = (new a)->c();
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
74,
[
[
9006,
0,
73,
[
[
9007,
0,
0
],
[
9004,
2,
25,
[
[
9051,
2,
25,
[
[
9052,
2,
2
],
[
9090,
4,
4
],
[
9005
],
[
9005
],
[
9006,
6,
25,
[
[
9004,
8,
11,
[
[
9063,
8,
10,
[
[
9070,
8,
8,
[
[
9013,
8,
8
]
]
],
[
9064,
10,
10,
[
[
9047,
10,
10
],
[
9005
]
]
]
]
]
]
],
[
9004,
13,
23,
[
[
9067,
13,
23,
[
[
9068,
13,
13,
[
[
9013,
13,
13
]
]
],
[
9005
],
[
9013,
17,
17
],
[
9059,
18,
19
],
[
9005
],
[
9005
],
[
9006,
21,
23
]
]
]
]
]
]
]
]
]
]
],
[
9004,
27,
38,
[
[
9077,
27,
37,
[
[
9047,
27,
27
],
[
9081,
29,
29
],
[
9092,
31,
37,
[
[
9074,
31,
35,
[
[
9090,
34,
34
],
[
9005
]
]
],
[
9013,
37,
37
]
]
]
]
]
]
],
[
9004,
40,
53,
[
[
9077,
40,
52,
[
[
9047,
40,
40
],
[
9081,
42,
42
],
[
9102,
44,
52,
[
[
9092,
44,
50,
[
[
9074,
44,
48,
[
[
9090,
47,
47
],
[
9005
]
]
],
[
9013,
50,
50
]
]
],
[
9095,
51,
52
]
]
]
]
]
]
],
[
9004,
55,
62,
[
[
9092,
55,
61,
[
[
9074,
55,
59,
[
[
9090,
58,
58
],
[
9005
]
]
],
[
9013,
61,
61
]
]
]
]
],
[
9004,
64,
73,
[
[
9102,
64,
72,
[
[
9092,
64,
70,
[
[
9074,
64,
68,
[
[
9090,
67,
67
],
[
9005
]
]
],
[
9013,
70,
70
]
]
],
[
9095,
71,
72
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
358,
5
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
123,
1
],
[
377,
2
],
[
352,
6
],
[
377,
1
],
[
313,
2
],
[
59,
1
],
[
377,
3
],
[
352,
6
],
[
377,
1
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
40,
1
],
[
302,
3
],
[
377,
1
],
[
311,
1
],
[
41,
1
],
[
362,
2
],
[
311,
1
],
[
59,
1
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
40,
1
],
[
302,
3
],
[
377,
1
],
[
311,
1
],
[
41,
1
],
[
362,
2
],
[
311,
1
],
[
40,
1
],
[
41,
1
],
[
59,
1
],
[
377,
2
],
[
40,
1
],
[
302,
3
],
[
377,
1
],
[
311,
1
],
[
41,
1
],
[
362,
2
],
[
311,
1
],
[
59,
1
],
[
377,
2
],
[
40,
1
],
[
302,
3
],
[
377,
1
],
[
311,
1
],
[
41,
1
],
[
362,
2
],
[
311,
1
],
[
40,
1
],
[
41,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_CLASS_DECLARATION
* n_CLASS_ATTRIBUTES
> class
> " "
* n_CLASS_NAME
> a
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_CLASS_MEMBER_DECLARATION_LIST
* n_CLASS_MEMBER_MODIFIER_LIST
* n_STRING
> public
> " "
* n_CLASS_MEMBER_DECLARATION
* n_VARIABLE
> $b
* n_EMPTY
> ;
> "\n\n "
* n_STATEMENT
* n_METHOD_DECLARATION
* n_METHOD_MODIFIER_LIST
* n_STRING
> public
* n_EMPTY
* n_STRING
> c
* n_DECLARATION_PARAMETER_LIST
> (
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> " "
> }
> "\n"
> }
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $d
> " "
* n_OPERATOR
> =
> " "
* n_OBJECT_PROPERTY_ACCESS
* n_NEW
> (
> new
> " "
* n_CLASS_NAME
> a
* n_EMPTY
> ->
* n_STRING
> b
> ;
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $e
> " "
* n_OPERATOR
> =
> " "
* n_METHOD_CALL
* n_OBJECT_PROPERTY_ACCESS
* n_NEW
> (
> new
> " "
* n_CLASS_NAME
> a
* n_EMPTY
> ->
* n_STRING
> c
* n_CALL_PARAMETER_LIST
> (
> )
> ;
> "\n\n"
* n_STATEMENT
* n_OBJECT_PROPERTY_ACCESS
* n_NEW
> (
> new
> " "
* n_CLASS_NAME
> a
* n_EMPTY
> ->
* n_STRING
> b
> ;
> "\n\n"
* n_STATEMENT
* n_METHOD_CALL
* n_OBJECT_PROPERTY_ACCESS
* n_NEW
> (
> new
> " "
* n_CLASS_NAME
> a
* n_EMPTY
> ->
* n_STRING
> c
* n_CALL_PARAMETER_LIST
> (
> )
> ;
> "\n"

View file

@ -6,180 +6,38 @@ if ($j->getStatus()['running']) {
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
19,
[
[
9006,
0,
18,
[
[
9007,
0,
0
],
[
9004,
2,
18,
[
[
9015,
2,
18,
[
[
9017,
2,
18,
[
[
9016,
4,
13,
[
[
9102,
5,
12,
[
[
9092,
5,
7,
[
[
9047,
5,
5
],
[
9013,
7,
7
]
]
],
[
9100,
8,
12,
[
[
9095,
8,
9
],
[
9087,
11,
11
]
]
]
]
]
]
],
[
9006,
15,
18
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
305,
2
],
[
377,
1
],
[
40,
1
],
[
313,
2
],
[
362,
2
],
[
311,
9
],
[
40,
1
],
[
41,
1
],
[
91,
1
],
[
319,
9
],
[
93,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
371,
16
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_CONDITION_LIST
* n_IF
> if
> " "
* n_CONTROL_CONDITION
> (
* n_METHOD_CALL
* n_OBJECT_PROPERTY_ACCESS
* n_VARIABLE
> $j
> ->
* n_STRING
> getStatus
* n_INDEX_ACCESS
* n_CALL_PARAMETER_LIST
> (
> )
> [
* n_STRING_SCALAR
> 'running'
> ]
> )
> " "
* n_STATEMENT_LIST
> {
> "\n "
> "// do something\n"
> }
> "\n"

View file

@ -3,207 +3,43 @@ if (isset(self::getSearchStates()[$state])) { }
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
21,
[
[
9006,
0,
20,
[
[
9007,
0,
0
],
[
9004,
2,
20,
[
[
9015,
2,
20,
[
[
9017,
2,
20,
[
[
9016,
4,
16,
[
[
9099,
5,
15,
[
[
9001,
5,
5
],
[
9095,
6,
15,
[
[
9100,
7,
14,
[
[
9099,
7,
11,
[
[
9089,
7,
9,
[
[
9090,
7,
7
],
[
9013,
9,
9
]
]
],
[
9095,
10,
11
]
]
],
[
9047,
13,
13
]
]
]
]
]
]
]
]
],
[
9006,
18,
20
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
305,
2
],
[
377,
1
],
[
40,
1
],
[
355,
5
],
[
40,
1
],
[
311,
4
],
[
383,
2
],
[
311,
15
],
[
40,
1
],
[
41,
1
],
[
91,
1
],
[
313,
6
],
[
93,
1
],
[
41,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n"
* n_STATEMENT
* n_CONDITION_LIST
* n_IF
> if
> " "
* n_CONTROL_CONDITION
> (
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> isset
* n_CALL_PARAMETER_LIST
> (
* n_INDEX_ACCESS
* n_FUNCTION_CALL
* n_CLASS_STATIC_ACCESS
* n_CLASS_NAME
> self
> ::
* n_STRING
> getSearchStates
* n_CALL_PARAMETER_LIST
> (
> )
> [
* n_VARIABLE
> $state
> ]
> )
> )
> " "
* n_STATEMENT_LIST
> {
> " "
> }
> "\n"

View file

@ -4,150 +4,32 @@ PHP_VERSION[0];
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
15,
[
[
9006,
0,
14,
[
[
9007,
0,
0
],
[
9004,
2,
8,
[
[
9100,
2,
7,
[
[
9089,
2,
4,
[
[
9090,
2,
2
],
[
9013,
4,
4
]
]
],
[
9087,
6,
6
]
]
]
]
],
[
9004,
10,
14,
[
[
9100,
10,
13,
[
[
9013,
10,
10
],
[
9086,
12,
12
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
311,
10
],
[
383,
2
],
[
311,
10
],
[
91,
1
],
[
319,
11
],
[
93,
1
],
[
59,
1
],
[
377,
1
],
[
311,
11
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n"
* n_STATEMENT
* n_INDEX_ACCESS
* n_CLASS_STATIC_ACCESS
* n_CLASS_NAME
> XHPASTNode
> ::
* n_STRING
> NODE_TYPES
> [
* n_STRING_SCALAR
> 'n_PROGRAM'
> ]
> ;
> "\n"
* n_STATEMENT
* n_INDEX_ACCESS
* n_STRING
> PHP_VERSION
> [
* n_NUMERIC_SCALAR
> 0
> ]
> ;
> "\n"

View file

@ -13,646 +13,133 @@ if (isset(foo()[0])) { }
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
71,
[
[
9006,
0,
70,
[
[
9007,
0,
0
],
[
9004,
2,
21,
[
[
9050,
2,
21,
[
[
9005
],
[
9005
],
[
9013,
4,
4
],
[
9059,
5,
6
],
[
9005
],
[
9005
],
[
9006,
8,
21,
[
[
9004,
10,
19,
[
[
9027,
10,
18,
[
[
9082,
12,
18,
[
[
9093,
12,
18,
[
[
9094,
13,
13,
[
[
9005
],
[
9086,
13,
13
]
]
],
[
9094,
15,
15,
[
[
9005
],
[
9086,
15,
15
]
]
],
[
9094,
17,
17,
[
[
9005
],
[
9086,
17,
17
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
],
[
9004,
23,
28,
[
[
9077,
23,
27,
[
[
9047,
23,
23
],
[
9081,
25,
25
],
[
9086,
27,
27
]
]
]
]
],
[
9004,
30,
40,
[
[
9077,
30,
39,
[
[
9047,
30,
30
],
[
9081,
32,
32
],
[
9100,
34,
39,
[
[
9099,
34,
36,
[
[
9001,
34,
34
],
[
9095,
35,
36
]
]
],
[
9086,
38,
38
]
]
]
]
]
]
],
[
9004,
42,
52,
[
[
9077,
42,
51,
[
[
9047,
42,
42
],
[
9081,
44,
44
],
[
9100,
46,
51,
[
[
9099,
46,
48,
[
[
9001,
46,
46
],
[
9095,
47,
48
]
]
],
[
9047,
50,
50
]
]
]
]
]
]
],
[
9004,
54,
70,
[
[
9015,
54,
70,
[
[
9017,
54,
70,
[
[
9016,
56,
66,
[
[
9099,
57,
65,
[
[
9001,
57,
57
],
[
9095,
58,
65,
[
[
9100,
59,
64,
[
[
9099,
59,
61,
[
[
9001,
59,
59
],
[
9095,
60,
61
]
]
],
[
9086,
63,
63
]
]
]
]
]
]
]
]
],
[
9006,
68,
70
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
3
],
[
40,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
341,
6
],
[
377,
1
],
[
91,
1
],
[
309,
1
],
[
44,
1
],
[
309,
1
],
[
44,
1
],
[
309,
1
],
[
93,
1
],
[
59,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
311,
3
],
[
40,
1
],
[
41,
1
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
59,
1
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
311,
3
],
[
40,
1
],
[
41,
1
],
[
91,
1
],
[
313,
2
],
[
93,
1
],
[
59,
1
],
[
377,
2
],
[
305,
2
],
[
377,
1
],
[
40,
1
],
[
355,
5
],
[
40,
1
],
[
311,
3
],
[
40,
1
],
[
41,
1
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
41,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> foo
* n_DECLARATION_PARAMETER_LIST
> (
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_RETURN
> return
> " "
* n_ARRAY_LITERAL
* n_ARRAY_VALUE_LIST
> [
* n_ARRAY_VALUE
* n_EMPTY
* n_NUMERIC_SCALAR
> 1
> ,
* n_ARRAY_VALUE
* n_EMPTY
* n_NUMERIC_SCALAR
> 2
> ,
* n_ARRAY_VALUE
* n_EMPTY
* n_NUMERIC_SCALAR
> 3
> ]
> ;
> "\n"
> }
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $i
> " "
* n_OPERATOR
> =
> " "
* n_NUMERIC_SCALAR
> 1
> ;
> "\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $x
> " "
* n_OPERATOR
> =
> " "
* n_INDEX_ACCESS
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> foo
* n_CALL_PARAMETER_LIST
> (
> )
> [
* n_NUMERIC_SCALAR
> 2
> ]
> ;
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $y
> " "
* n_OPERATOR
> =
> " "
* n_INDEX_ACCESS
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> foo
* n_CALL_PARAMETER_LIST
> (
> )
> [
* n_VARIABLE
> $i
> ]
> ;
> "\n\n"
* n_STATEMENT
* n_CONDITION_LIST
* n_IF
> if
> " "
* n_CONTROL_CONDITION
> (
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> isset
* n_CALL_PARAMETER_LIST
> (
* n_INDEX_ACCESS
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> foo
* n_CALL_PARAMETER_LIST
> (
> )
> [
* n_NUMERIC_SCALAR
> 0
> ]
> )
> )
> " "
* n_STATEMENT_LIST
> {
> " "
> }
> "\n"

View file

@ -2,54 +2,12 @@
~~~~~~~~~~
pass, rtrim
~~~~~~~~~~
{
"tree": [
9000,
0,
3,
[
[
9006,
0,
3,
[
[
9007,
0,
0
],
[
9004,
2,
3,
[
[
9086,
2,
2
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
309,
4
],
[
59,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_NUMERIC_SCALAR
> 0b10
> ;

View file

@ -4,145 +4,30 @@ function f(callable $c) {}
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
13,
[
[
9006,
0,
12,
[
[
9007,
0,
0
],
[
9004,
2,
12,
[
[
9050,
2,
12,
[
[
9005
],
[
9005
],
[
9013,
4,
4
],
[
9059,
5,
9,
[
[
9060,
6,
8,
[
[
9061,
6,
6
],
[
9047,
8,
8
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
11,
12
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
391,
8
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> f
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_TYPE_NAME
> callable
> " "
* n_VARIABLE
> $c
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> }
> "\n"

View file

@ -10,62 +10,15 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
8,
[
[
9006,
0,
0,
[
[
9007,
0,
0
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
371,
10
],
[
371,
11
],
[
371,
13
],
[
377,
1
],
[
372,
18
],
[
377,
1
],
[
371,
24
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
> "# comment\n"
> "// comment\n"
> "/* comment */"
> "\n"
> "/**\n * comment\n */"
> "\n"
> "/* unterminated comment\n"

View file

@ -5,91 +5,20 @@ EODOC;
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
8,
[
[
9006,
0,
7,
[
[
9007,
0,
0
],
[
9004,
2,
7,
[
[
9077,
2,
6,
[
[
9047,
2,
2
],
[
9081,
4,
4
],
[
9098,
6,
6
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
313,
2
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
380,
14
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $a
> " "
* n_OPERATOR
> =
> " "
* n_HEREDOC
> "<<<EODOC\nEODOC"
> ;
> "\n"

View file

@ -2,176 +2,35 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
22,
[
[
9006,
0,
21,
[
[
9007,
0,
0
],
[
9004,
2,
21,
[
[
9041,
2,
21,
[
[
9006,
4,
5
],
[
9042,
7,
16,
[
[
9043,
7,
16,
[
[
9090,
10,
10
],
[
9047,
12,
12
],
[
9006,
15,
16
]
]
]
]
],
[
9113,
18,
21,
[
[
9006
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
342,
3
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
343,
5
],
[
377,
1
],
[
40,
1
],
[
311,
1
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
395,
7
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_TRY
> try
> " "
* n_STATEMENT_LIST
> {
> }
> " "
* n_CATCH_LIST
* n_CATCH
> catch
> " "
> (
* n_CLASS_NAME
> C
> " "
* n_VARIABLE
> $x
> )
> " "
* n_STATEMENT_LIST
> {
> }
> " "
* n_FINALLY
* n_STATEMENT_LIST
> "\n"

View file

@ -2,162 +2,34 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
15,
[
[
9006,
0,
14,
[
[
9007,
0,
0
],
[
9004,
2,
8,
[
[
9100,
2,
7,
[
[
9082,
2,
4,
[
[
9093,
2,
4,
[
[
9094,
3,
3,
[
[
9005
],
[
9086,
3,
3
]
]
]
]
]
]
],
[
9086,
6,
6
]
]
]
]
],
[
9004,
10,
14,
[
[
9100,
10,
13,
[
[
9087,
10,
10
],
[
9086,
12,
12
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
59,
1
],
[
377,
1
],
[
319,
3
],
[
91,
1
],
[
309,
1
],
[
93,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_INDEX_ACCESS
* n_ARRAY_LITERAL
* n_ARRAY_VALUE_LIST
> [
* n_ARRAY_VALUE
* n_EMPTY
* n_NUMERIC_SCALAR
> 1
> ]
> [
* n_NUMERIC_SCALAR
> 0
> ]
> ;
> " "
* n_STATEMENT
* n_INDEX_ACCESS
* n_STRING_SCALAR
> "\"X\""
> [
* n_NUMERIC_SCALAR
> 0
> ]
> ;
> "\n"

View file

@ -15,354 +15,74 @@ lbl:
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
39,
[
[
9006,
0,
38,
[
[
9007,
0,
0
],
[
9004,
2,
3,
[
[
9086,
2,
2
]
]
],
[
9004,
5,
6,
[
[
9086,
5,
5
]
]
],
[
9004,
8,
10,
[
[
9075,
8,
9,
[
[
9081,
8,
8
],
[
9086,
9,
9
]
]
]
]
],
[
9004,
12,
14,
[
[
9075,
12,
13,
[
[
9081,
12,
12
],
[
9086,
13,
13
]
]
]
]
],
[
9004,
16,
17,
[
[
9086,
16,
16
]
]
],
[
9004,
19,
20,
[
[
9086,
19,
19
]
]
],
[
9004,
22,
23,
[
[
9087,
22,
22
]
]
],
[
9004,
25,
26,
[
[
9087,
25,
25
]
]
],
[
9004,
28,
29,
[
[
9084,
28,
28
]
]
],
[
9004,
31,
32,
[
[
9087,
31,
31
]
]
],
[
9004,
34,
35,
[
[
9087,
34,
34
]
]
],
[
9014,
37,
38,
[
[
9013,
37,
37
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
310,
3
],
[
59,
1
],
[
377,
1
],
[
45,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
45,
1
],
[
310,
3
],
[
59,
1
],
[
377,
1
],
[
310,
3
],
[
59,
1
],
[
377,
1
],
[
309,
4
],
[
59,
1
],
[
377,
1
],
[
319,
3
],
[
59,
1
],
[
377,
1
],
[
319,
3
],
[
59,
1
],
[
377,
1
],
[
320,
3
],
[
59,
1
],
[
377,
1
],
[
319,
4
],
[
59,
1
],
[
377,
1
],
[
319,
4
],
[
59,
1
],
[
377,
1
],
[
311,
3
],
[
58,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1
> ;
> "\n"
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1.1
> ;
> "\n"
* n_STATEMENT
* n_UNARY_PREFIX_EXPRESSION
* n_OPERATOR
> -
* n_NUMERIC_SCALAR
> 1
> ;
> "\n"
* n_STATEMENT
* n_UNARY_PREFIX_EXPRESSION
* n_OPERATOR
> -
* n_NUMERIC_SCALAR
> 1.1
> ;
> "\n"
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1e1
> ;
> "\n"
* n_STATEMENT
* n_NUMERIC_SCALAR
> 0xFF
> ;
> "\n"
* n_STATEMENT
* n_STRING_SCALAR
> 'a'
> ;
> "\n"
* n_STATEMENT
* n_STRING_SCALAR
> "\"a\""
> ;
> "\n"
* n_STATEMENT
* n_BACKTICKS_EXPRESSION
> `a`
> ;
> "\n"
* n_STATEMENT
* n_STRING_SCALAR
> b'a'
> ;
> "\n"
* n_STATEMENT
* n_STRING_SCALAR
> "b\"a\""
> ;
> "\n"
* n_LABEL
* n_STRING
> lbl
> :
> "\n"

View file

@ -2,106 +2,19 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree" : [
9000,
0,
11,
[
[
9006,
0,
10,
[
[
9007,
0,
0
],
[
9004,
2,
10,
[
[
9041,
2,
10,
[
[
9006,
4,
5
],
[
9042
],
[
9113,
7,
10,
[
[
9006
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
342,
3
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
],
[
395,
7
],
[
377,
1
],
[
123,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_TRY
> try
> " "
* n_STATEMENT_LIST
> {
> }
* n_CATCH_LIST
* n_FINALLY
* n_STATEMENT_LIST
> "\n"

View file

@ -2,69 +2,15 @@
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
5,
[
[
9006,
0,
4,
[
[
9007,
0,
0
],
[
9004,
2,
4,
[
[
9082,
2,
3,
[
[
9093,
2,
3
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
91,
1
],
[
93,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_ARRAY_LITERAL
* n_ARRAY_VALUE_LIST
> [
> ]
> ;
> "\n"

File diff suppressed because it is too large Load diff

View file

@ -6,210 +6,43 @@
~~~~~~~~~~
pass, comment="Omits ASP tags since parser support is off as built."
~~~~~~~~~~
{
"tree": [
9000,
0,
21,
[
[
9006,
0,
21,
[
[
9007,
0,
0
],
[
9004,
2,
3,
[
[
9086,
2,
2
]
]
],
[
9004,
5,
5,
[
[
9005
]
]
],
[
9007,
6,
6
],
[
9004,
8,
9,
[
[
9086,
8,
8
]
]
],
[
9004,
11,
11,
[
[
9005
]
]
],
[
9007,
12,
12
],
[
9004,
14,
15,
[
[
9086,
14,
14
]
]
],
[
9004,
17,
17,
[
[
9005
]
]
],
[
9034,
18,
18
],
[
9034,
19,
19
],
[
9034,
20,
20
],
[
9034,
21,
21
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
376,
3
],
[
373,
2
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
376,
3
],
[
374,
3
],
[
377,
1
],
[
309,
1
],
[
59,
1
],
[
377,
1
],
[
376,
3
],
[
315,
1
],
[
315,
5
],
[
315,
1
],
[
315,
5
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> " "
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1
> ;
> " "
* n_STATEMENT
* n_EMPTY
* n_OPEN_TAG
> <?
> " "
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1
> ;
> " "
* n_STATEMENT
* n_EMPTY
* n_OPEN_TAG
> <?=
> " "
* n_STATEMENT
* n_NUMERIC_SCALAR
> 1
> ;
> " "
* n_STATEMENT
* n_EMPTY
* n_INLINE_HTML
> <
* n_INLINE_HTML
> "a />\n"
* n_INLINE_HTML
> <
* n_INLINE_HTML
> "b ?>\n"

File diff suppressed because it is too large Load diff

View file

@ -11,439 +11,90 @@ function g() {
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
54,
[
[
9006,
0,
53,
[
[
9007,
0,
0
],
[
9004,
2,
53,
[
[
9050,
2,
53,
[
[
9005
],
[
9005
],
[
9013,
4,
4
],
[
9059,
5,
6
],
[
9005
],
[
9005
],
[
9006,
8,
53,
[
[
9004,
10,
11,
[
[
9112,
10,
10,
[
[
9005
],
[
9005
]
]
]
]
],
[
9004,
13,
16,
[
[
9112,
13,
15,
[
[
9047,
15,
15,
[
[
9005
]
]
]
]
]
]
],
[
9004,
18,
25,
[
[
9112,
18,
24,
[
[
9047,
20,
20
],
[
9047,
24,
24
]
]
]
]
],
[
9004,
27,
36,
[
[
9077,
27,
35,
[
[
9047,
27,
27
],
[
9081,
29,
29
],
[
9112,
31,
35,
[
[
9047,
34,
34,
[
[
9005
]
]
]
]
]
]
]
]
],
[
9004,
38,
51,
[
[
9077,
38,
50,
[
[
9047,
38,
38
],
[
9081,
40,
40
],
[
9112,
42,
50,
[
[
9047,
45,
45
],
[
9047,
49,
49
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
3
],
[
394,
5
],
[
59,
1
],
[
377,
3
],
[
394,
5
],
[
377,
1
],
[
313,
2
],
[
59,
1
],
[
377,
3
],
[
394,
5
],
[
377,
1
],
[
313,
2
],
[
377,
1
],
[
363,
2
],
[
377,
1
],
[
313,
2
],
[
59,
1
],
[
377,
4
],
[
313,
5
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
40,
1
],
[
394,
5
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
59,
1
],
[
377,
3
],
[
313,
5
],
[
377,
1
],
[
61,
1
],
[
377,
1
],
[
40,
1
],
[
394,
5
],
[
377,
1
],
[
313,
2
],
[
377,
1
],
[
363,
2
],
[
377,
1
],
[
313,
2
],
[
41,
1
],
[
59,
1
],
[
377,
1
],
[
125,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> g
* n_DECLARATION_PARAMETER_LIST
> (
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> "\n "
* n_STATEMENT
* n_YIELD
* n_EMPTY
* n_EMPTY
> ;
> "\n "
* n_STATEMENT
* n_YIELD
> yield
> " "
* n_VARIABLE
* n_EMPTY
> ;
> "\n "
* n_STATEMENT
* n_YIELD
> yield
> " "
* n_VARIABLE
> $y
> " "
> =>
> " "
* n_VARIABLE
> $z
> ;
> "\n\n "
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $data
> " "
* n_OPERATOR
> =
> " "
* n_YIELD
> (
> yield
> " "
* n_VARIABLE
* n_EMPTY
> )
> ;
> "\n "
* n_STATEMENT
* n_BINARY_EXPRESSION
* n_VARIABLE
> $data
> " "
* n_OPERATOR
> =
> " "
* n_YIELD
> (
> yield
> " "
* n_VARIABLE
> $b
> " "
> =>
> " "
* n_VARIABLE
> $c
> )
> ;
> "\n"
> }
> "\n"

File diff suppressed because it is too large Load diff

View file

@ -8,373 +8,79 @@ use G, H as I;
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
41,
[
[
9006,
0,
40,
[
[
9007,
0,
0
],
[
9004,
2,
5,
[
[
9009,
2,
4,
[
[
9010,
4,
4,
[
[
9001,
4,
4
],
[
9005
]
]
]
]
]
]
],
[
9004,
7,
11,
[
[
9009,
7,
10,
[
[
9010,
9,
10,
[
[
9001,
9,
10
],
[
9005
]
]
]
]
]
]
],
[
9004,
13,
20,
[
[
9009,
13,
19,
[
[
9010,
15,
19,
[
[
9001,
15,
15
],
[
9013,
19,
19
]
]
]
]
]
]
],
[
9004,
22,
28,
[
[
9009,
22,
27,
[
[
9010,
24,
24,
[
[
9001,
24,
24
],
[
9005
]
]
],
[
9010,
27,
27,
[
[
9001,
27,
27
],
[
9005
]
]
]
]
]
]
],
[
9004,
30,
40,
[
[
9009,
30,
39,
[
[
9010,
32,
32,
[
[
9001,
32,
32
],
[
9005
]
]
],
[
9010,
35,
39,
[
[
9001,
35,
35
],
[
9013,
39,
39
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
345,
3
],
[
377,
1
],
[
311,
1
],
[
59,
1
],
[
377,
1
],
[
345,
3
],
[
377,
1
],
[
389,
1
],
[
311,
1
],
[
59,
1
],
[
377,
1
],
[
345,
3
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
331,
2
],
[
377,
1
],
[
311,
1
],
[
59,
1
],
[
377,
1
],
[
345,
3
],
[
377,
1
],
[
311,
1
],
[
44,
1
],
[
377,
1
],
[
311,
1
],
[
59,
1
],
[
377,
1
],
[
345,
3
],
[
377,
1
],
[
311,
1
],
[
44,
1
],
[
377,
1
],
[
311,
1
],
[
377,
1
],
[
331,
2
],
[
377,
1
],
[
311,
1
],
[
59,
1
],
[
377,
1
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_USE_LIST
> use
> " "
* n_USE
* n_SYMBOL_NAME
> A
* n_EMPTY
> ;
> "\n"
* n_STATEMENT
* n_USE_LIST
> use
> " "
* n_USE
* n_SYMBOL_NAME
> "\"
> B
* n_EMPTY
> ;
> "\n"
* n_STATEMENT
* n_USE_LIST
> use
> " "
* n_USE
* n_SYMBOL_NAME
> C
> " "
> as
> " "
* n_STRING
> D
> ;
> "\n"
* n_STATEMENT
* n_USE_LIST
> use
> " "
* n_USE
* n_SYMBOL_NAME
> E
* n_EMPTY
> ,
> " "
* n_USE
* n_SYMBOL_NAME
> F
* n_EMPTY
> ;
> "\n"
* n_STATEMENT
* n_USE_LIST
> use
> " "
* n_USE
* n_SYMBOL_NAME
> G
* n_EMPTY
> ,
> " "
* n_USE
* n_SYMBOL_NAME
> H
> " "
> as
> " "
* n_STRING
> I
> ;
> "\n"

View file

@ -15,704 +15,146 @@ b(...$foo);
~~~~~~~~~~
pass
~~~~~~~~~~
{
"tree": [
9000,
0,
77,
[
[
9006,
0,
76,
[
[
9007,
0,
0
],
[
9004,
2,
12,
[
[
9050,
2,
12,
[
[
9005
],
[
9005
],
[
9013,
4,
4
],
[
9059,
5,
8,
[
[
9060,
6,
7,
[
[
9005
],
[
9114,
6,
7,
[
[
9047,
7,
7
]
]
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
10,
12
]
]
]
]
],
[
9004,
14,
25,
[
[
9050,
14,
25,
[
[
9005
],
[
9005
],
[
9013,
16,
16
],
[
9059,
17,
21,
[
[
9060,
18,
18,
[
[
9005
],
[
9049,
18,
20,
[
[
9114,
19,
20,
[
[
9047,
20,
20
]
]
]
]
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
23,
25
]
]
]
]
],
[
9004,
27,
39,
[
[
9050,
27,
39,
[
[
9005
],
[
9005
],
[
9013,
29,
29
],
[
9059,
30,
35,
[
[
9060,
31,
34,
[
[
9090,
31,
31
],
[
9114,
33,
34,
[
[
9047,
34,
34
]
]
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
37,
39
]
]
]
]
],
[
9004,
41,
54,
[
[
9050,
41,
54,
[
[
9005
],
[
9005
],
[
9013,
43,
43
],
[
9059,
44,
50,
[
[
9060,
45,
47,
[
[
9090,
45,
45
],
[
9049,
47,
49,
[
[
9114,
48,
49,
[
[
9047,
49,
49
]
]
]
]
],
[
9005
]
]
]
]
],
[
9005
],
[
9005
],
[
9006,
52,
54
]
]
]
]
],
[
9004,
56,
69,
[
[
9099,
56,
68,
[
[
9001,
56,
56
],
[
9095,
57,
68,
[
[
9114,
58,
58,
[
[
0,
58,
58
]
]
]
]
]
]
]
]
],
[
9004,
71,
76,
[
[
9099,
71,
75,
[
[
9001,
71,
71
],
[
9095,
72,
75,
[
[
9114,
73,
73,
[
[
0,
73,
73
]
]
]
]
]
]
]
]
]
]
]
]
],
"stream": [
[
373,
5
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
396,
3
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
38,
1
],
[
396,
3
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
311,
4
],
[
377,
1
],
[
396,
3
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
339,
8
],
[
377,
1
],
[
311,
1
],
[
40,
1
],
[
311,
4
],
[
377,
1
],
[
38,
1
],
[
396,
3
],
[
313,
2
],
[
41,
1
],
[
377,
1
],
[
123,
1
],
[
377,
1
],
[
125,
1
],
[
377,
2
],
[
311,
1
],
[
40,
1
],
[
396,
3
],
[
91,
1
],
[
309,
1
],
[
44,
1
],
[
377,
1
],
[
309,
1
],
[
44,
1
],
[
377,
1
],
[
309,
1
],
[
93,
1
],
[
41,
1
],
[
59,
1
],
[
377,
2
],
[
311,
1
],
[
40,
1
],
[
396,
3
],
[
313,
4
],
[
41,
1
],
[
59,
1
],
[
377,
2
]
]
}
* n_PROGRAM
* n_STATEMENT_LIST
* n_OPEN_TAG
> <?php
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> a
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_EMPTY
* n_UNPACK
> ...
* n_VARIABLE
> $a
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> " "
> }
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> b
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_EMPTY
* n_VARIABLE_REFERENCE
> &
* n_UNPACK
> ...
* n_VARIABLE
> $a
* n_EMPTY
> ...
> $a
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> " "
> }
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> c
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_CLASS_NAME
> Type
> " "
* n_UNPACK
> ...
* n_VARIABLE
> $a
* n_EMPTY
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> " "
> }
> "\n\n"
* n_STATEMENT
* n_FUNCTION_DECLARATION
* n_EMPTY
* n_EMPTY
* n_STRING
> d
* n_DECLARATION_PARAMETER_LIST
> (
* n_DECLARATION_PARAMETER
* n_CLASS_NAME
> Type
> " "
* n_VARIABLE_REFERENCE
> &
* n_UNPACK
> ...
* n_VARIABLE
> $a
* n_EMPTY
> ...
> $a
> )
* n_EMPTY
* n_EMPTY
* n_STATEMENT_LIST
> {
> " "
> }
> "\n\n"
* n_STATEMENT
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> a
* n_CALL_PARAMETER_LIST
> (
* n_UNPACK
* "<INVALID TYPE \"0\">"
> ...
> [
> 1
> ,
> " "
> 2
> ,
> " "
> 3
> ]
> )
> ;
> "\n\n"
* n_STATEMENT
* n_FUNCTION_CALL
* n_SYMBOL_NAME
> b
* n_CALL_PARAMETER_LIST
> (
* n_UNPACK
* "<INVALID TYPE \"0\">"
> ...
> $foo
> )
> ;
> "\n\n"