nl_tokens: Read member flags
pl_tokens: function ( asInterface ) { const result = [ - 1 , - 1 , - 1 ] ; if ( this . is ( "T_MEMBER_FLAGS" ) ) { let idx = 0 , val = 0 ; do { switch ( this . token ) { case this . tok . T_PUBLIC : idx = 0 ; val = 0 ; break ; case this . tok . T_PROTECTED : idx = 0 ; val = 1 ; break ; case this . tok . T_PRIVATE : idx = 0 ; val = 2 ; break ; case this . tok . T_STATIC : idx = 1 ; val = 1 ; break ; case this . tok . T_ABSTRACT : idx = 2 ; val = 1 ; break ; case this . tok . T_FINAL : idx = 2 ; val = 2 ; break ; } if ( asInterface ) { if ( idx == 0 && val == 2 ) { // an interface can't be private this . expect ( [ this . tok . T_PUBLIC , this . tok . T_PROTECTED ] ) ; val = - 1 ; } else if ( idx == 2 && val == 1 ) { // an interface cant be abstract this . error ( ) ; val = - 1 ; } } if ( result [ idx ] !== - 1 ) { // already defined flag this . error ( ) ; } else if ( val !== - 1 ) { result [ idx ] = val ; } } while ( this . next ( ) . is ( "T_MEMBER_FLAGS" ) ) ; } if ( <mask> [ 1 ] == - 1 ) result [ 1 ] = 0 ; if ( result [ 2 ] == - 1 ) result [ 2 ] = 0 ; return result ; }