internal: fixed parsing of anonymous classes
Since now 'ctor_arguments' returns nil, it is necessary to initialize it to avoid panics.
This commit is contained in:
parent
61523ab396
commit
78492f6456
BIN
internal/php7/php7.go
generated
BIN
internal/php7/php7.go
generated
Binary file not shown.
@ -2497,6 +2497,10 @@ non_empty_for_exprs:
|
||||
anonymous_class:
|
||||
T_CLASS ctor_arguments extends_from implements_list backup_doc_comment '{' class_statement_list '}'
|
||||
{
|
||||
if $2 == nil {
|
||||
$2 = &ArgumentList{}
|
||||
}
|
||||
|
||||
class := &ast.StmtClass{
|
||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $8),
|
||||
ClassTkn: $1,
|
||||
|
Loading…
Reference in New Issue
Block a user