RFR: 8027302: Identifiers containing unicode escapes are not recognized as reserved words
Hannes Wallnöfer
hannes.wallnoefer at oracle.com
Fri Oct 13 08:36:42 UTC 2017
Please review:
Bug: https://bugs.openjdk.java.net/browse/JDK-8027302
Webrev: http://cr.openjdk.java.net/~hannesw/8027302/webrev.01
ES6 and ES5 require different handling regarding unencoding Unicode escapes in keywords and identifiers. This patch makes handling more compliant and more efficient in ES6 mode (previously we didn’t cover all cases, and checked every identifier instead of just those containing escapes).
About the removal of Lexer.isEscapeCharacter: this method always returns true in Lexer, and it’s only purpose was to be overridden in JSON parser, but JSON parser doesn’t extend Lexer/Parser anymore.
Thanks,
Hannes
More information about the nashorn-dev
mailing list