File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/main/php/lang/ast/emit Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ protected function emitConst($node) {
111
111
protected function emitAssignment ($ node ) {
112
112
if ('array ' === $ node ->value [0 ]->arity ) {
113
113
$ this ->out ->write ('list( ' );
114
- $ this ->arguments ($ node ->value [0 ]->value );
114
+ foreach ($ node ->value [0 ]->value as $ expr ) {
115
+ $ this ->emit ($ expr [1 ]);
116
+ $ this ->out ->write (', ' );
117
+ }
115
118
$ this ->out ->write (') ' );
116
119
$ this ->out ->write ($ node ->symbol ->id );
117
120
$ this ->emit ($ node ->value [1 ]);
Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ protected function catches($catch) {
34
34
protected function emitAssignment ($ node ) {
35
35
if ('array ' === $ node ->value [0 ]->arity ) {
36
36
$ this ->out ->write ('list( ' );
37
- $ this ->arguments ($ node ->value [0 ]->value );
37
+ foreach ($ node ->value [0 ]->value as $ expr ) {
38
+ $ this ->emit ($ expr [1 ]);
39
+ $ this ->out ->write (', ' );
40
+ }
38
41
$ this ->out ->write (') ' );
39
42
$ this ->out ->write ($ node ->symbol ->id );
40
43
$ this ->emit ($ node ->value [1 ]);
You can’t perform that action at this time.
0 commit comments