File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -459,9 +459,18 @@ module.exports = {
459
459
result . target = this . next ( ) . read_namespace_name ( ) ;
460
460
} else if ( this . token === this . tok . T_AS ) {
461
461
result . act = 'as' ;
462
- result . flags = this . next ( ) . read_member_flags ( ) ;
463
- result . target = this . expect ( this . tok . T_STRING ) . text ( ) ;
464
- this . next ( ) ;
462
+ if ( this . next ( ) . is ( 'T_MEMBER_FLAGS' ) ) {
463
+ result . flags = this . read_member_flags ( ) ;
464
+ } else {
465
+ result . flags = null ;
466
+ }
467
+ if ( this . token === this . tok . T_STRING ) {
468
+ result . target = this . text ( ) ;
469
+ this . next ( ) ;
470
+ } else if ( result . flags === null ) {
471
+ // no visibility flags and no name => too bad
472
+ this . expect ( this . tok . T_STRING )
473
+ }
465
474
} else {
466
475
this . expect ( [
467
476
this . tok . T_AS ,
You can’t perform that action at this time.
0 commit comments