+1

PS. After few more changesets are done, perhaps we should perhaps have "negative es6" tests. i.e., attempt es6 constructs in default es5 mode and expect syntax errors.

-Sundar

On 9/1/2015 8:35 PM, Andreas Woess wrote:
Bikeshedding is welcomed :) I've uploaded a new webrev[1] with s/BINARY_LITERAL/BINARY_NUMBER/ and an es6 flag in Lexer as suggested by Sundar.

[1] http://cr.openjdk.java.net/~aw/8134873/webrev.01/

Thanks,
Andreas

On 01/09/15 16:42, Attila Szegedi wrote:
- How about we use BINARY_NUMBER instead of BINARY_LITERAL? I know this is bikeshedding… It’s still more consisent with other literal token types (e.g. NULL and STRING) that don’t have the _LITERAL suffix. If we made it consistent the other way round, we’d have to have NULL_LITERAL, STRING_LITERAL, etc. Of course, we can just choose to live with the inconsistency and leave it as it is.

- These literals should only be recognized with --language=es6, shouldn’t they? In the current form, it seems like the code will recognize them with es5 language too, won’t it?

Attila.

On Sep 1, 2015, at 4:30 PM, Andreas Woess <andreas.wo...@oracle.com> wrote:

Please reviewhttp://cr.openjdk.java.net/~aw/8134873/ forhttps://bugs.openjdk.java.net/browse/JDK-8134873

Implements Lexer/Parser support for ECMAScript 6 binary (0b) and octal (0o) literals. I've renamed OCTAL (legacy octal literal, e.g. 0777) to OCTAL_LEGACY and added OCTAL and BINARY_LITERAL token types (the _LITERAL suffix is to disambiguate with TokenKind.BINARY).

Thanks,
Andreas



Reply via email to