nl_tokens: Checks the flags are valid and that we don t duplicate flags .
pl_tokens: function checkFlags ( flags ) { const seen = <mask> Set ( ) ; for ( const flag of flags ) { if ( seen . has ( flag ) || ! validFlags . includes ( flag ) ) { throw new SyntaxError ( ` ${ flags } ` ) ; } seen . add ( flag ) ; } return flags . split ( '' ) . sort ( ) . join ( '' ) ; }