Skip to content

Commit d86ca0f

Browse files
committed
Support arbitrary expressions in new/instanceof
1 parent c8d1216 commit d86ca0f

File tree

3 files changed

+575
-509
lines changed

3 files changed

+575
-509
lines changed

grammar/php7.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ name:
804804
class_name_reference:
805805
class_name { $$ = $1; }
806806
| new_variable { $$ = $1; }
807+
| '(' expr ')' { $$ = $2; }
807808
| error { $$ = Expr\Error[]; $this->errorState = 2; }
808809
;
809810

0 commit comments

Comments
 (0)