nl_tokens: parse an unquoted key
pl_tokens: function parseKey ( ) { var specialValues = [ 'null' , 'true' , 'false' ] ; var key = '' ; var c = curr ( ) ; var regexp = / [a-zA-Z_$\d] / ; // letter, number, underscore, dollar character while ( regexp . test ( c ) ) { key += c ; i ++ ; c = curr ( ) ; } if ( specialValues . indexOf ( key ) === - 1 ) { chars . push ( '"' + key + '"' ) ; } else { chars . push ( <mask> ) ; } }