File tree Expand file tree Collapse file tree 1 file changed +107
-62
lines changed Expand file tree Collapse file tree 1 file changed +107
-62
lines changed Original file line number Diff line number Diff line change @@ -11,70 +11,115 @@ function test () {
11
11
}
12
12
ZEP ;
13
13
14
- echo json_encode (
15
- zephir_parse_file ($ code , '(eval code) ' ),
16
- JSON_PRETTY_PRINT
17
- );
14
+ var_dump (zephir_parse_file ($ code , '(eval code) ' ));
18
15
19
16
?>
20
17
--EXPECT--
21
- [
22
- {
23
- "type": "function",
24
- "name": "test",
25
- "statements": [
26
- {
27
- "type": "let",
28
- "assignments": [
29
- {
30
- "assign-type": "variable",
31
- "operator": "assign",
32
- "variable": "t",
33
- "expr": {
34
- "type": "bitwise_and",
35
- "left": {
36
- "type": "variable",
37
- "value": "u",
38
- "file": "(eval code)",
39
- "line": 2,
40
- "char": 15
41
- },
42
- "right": {
43
- "type": "bitwise_shiftleft",
44
- "left": {
45
- "type": "variable",
46
- "value": "v",
47
- "file": "(eval code)",
48
- "line": 2,
49
- "char": 20
50
- },
51
- "right": {
52
- "type": "int",
53
- "value": "7",
54
- "file": "(eval code)",
55
- "line": 2,
56
- "char": 23
57
- },
58
- "file": "(eval code)",
59
- "line": 2,
60
- "char": 23
61
- },
62
- "file": "(eval code)",
63
- "line": 2,
64
- "char": 23
65
- },
66
- "file": "(eval code)",
67
- "line": 2,
68
- "char": 23
69
- }
70
- ],
71
- "file": "(eval code)",
72
- "line": 3,
73
- "char": 1
18
+ array(1) {
19
+ [0]=>
20
+ array(6) {
21
+ ["type"]=>
22
+ string(8) "function"
23
+ ["name"]=>
24
+ string(4) "test"
25
+ ["statements"]=>
26
+ array(1) {
27
+ [0]=>
28
+ array(5) {
29
+ ["type"]=>
30
+ string(3) "let"
31
+ ["assignments"]=>
32
+ array(1) {
33
+ [0]=>
34
+ array(7) {
35
+ ["assign-type"]=>
36
+ string(8) "variable"
37
+ ["operator"]=>
38
+ string(6) "assign"
39
+ ["variable"]=>
40
+ string(1) "t"
41
+ ["expr"]=>
42
+ array(6) {
43
+ ["type"]=>
44
+ string(11) "bitwise_and"
45
+ ["left"]=>
46
+ array(5) {
47
+ ["type"]=>
48
+ string(8) "variable"
49
+ ["value"]=>
50
+ string(1) "u"
51
+ ["file"]=>
52
+ string(11) "(eval code)"
53
+ ["line"]=>
54
+ int(2)
55
+ ["char"]=>
56
+ int(15)
57
+ }
58
+ ["right"]=>
59
+ array(6) {
60
+ ["type"]=>
61
+ string(17) "bitwise_shiftleft"
62
+ ["left"]=>
63
+ array(5) {
64
+ ["type"]=>
65
+ string(8) "variable"
66
+ ["value"]=>
67
+ string(1) "v"
68
+ ["file"]=>
69
+ string(11) "(eval code)"
70
+ ["line"]=>
71
+ int(2)
72
+ ["char"]=>
73
+ int(20)
74
+ }
75
+ ["right"]=>
76
+ array(5) {
77
+ ["type"]=>
78
+ string(3) "int"
79
+ ["value"]=>
80
+ string(1) "7"
81
+ ["file"]=>
82
+ string(11) "(eval code)"
83
+ ["line"]=>
84
+ int(2)
85
+ ["char"]=>
86
+ int(23)
87
+ }
88
+ ["file"]=>
89
+ string(11) "(eval code)"
90
+ ["line"]=>
91
+ int(2)
92
+ ["char"]=>
93
+ int(23)
94
+ }
95
+ ["file"]=>
96
+ string(11) "(eval code)"
97
+ ["line"]=>
98
+ int(2)
99
+ ["char"]=>
100
+ int(23)
74
101
}
75
- ],
76
- "file": "(eval code)",
77
- "line": 1,
78
- "char": 9
102
+ ["file"]=>
103
+ string(11) "(eval code)"
104
+ ["line"]=>
105
+ int(2)
106
+ ["char"]=>
107
+ int(23)
108
+ }
109
+ }
110
+ ["file"]=>
111
+ string(11) "(eval code)"
112
+ ["line"]=>
113
+ int(3)
114
+ ["char"]=>
115
+ int(1)
116
+ }
79
117
}
80
- ]
118
+ ["file"]=>
119
+ string(11) "(eval code)"
120
+ ["line"]=>
121
+ int(1)
122
+ ["char"]=>
123
+ int(9)
124
+ }
125
+ }
You can’t perform that action at this time.
0 commit comments