On 2014/12/17 18:12:58, arv wrote:
On 2014/12/17 18:04:59, caitp wrote:
>

https://codereview.chromium.org/811113002/diff/20001/test/mjsunit/harmony/templates.js
> File test/mjsunit/harmony/templates.js (right):
>
>

https://codereview.chromium.org/811113002/diff/20001/test/mjsunit/harmony/templates.js#newcode479
> test/mjsunit/harmony/templates.js:479: assertEquals('\u000012', `\012`);
> Few other things:
>
> "\0a" matches the grammar `EscapeSequence :: 0 [lookahead ∉ DecimalDigit]`,
> while "\012" would be an octal literal.
>
> In SpiderMonkey, they are also throwing when trying to use the legacy octal
> literal within a template, so it's probably a good idea to make sure we
throw
> with message "strict_octal_literal" if we hit an octal literal within a
template
> span.

This patch needs more work but I'm not sure SpiderMonkey is right here.

`\012` should be equal to '012' according to the spec.

I don't think `\012` would be "012" --- `\0` cannot ever match the
CharacterEscapeSequence production, it can at best be `EscapeSequence :: 0
[lookahead ∉ DecimalDigit]`, and LegacyOctalEscapeSequence is not an option (per
16.1), so it shouldn't be "012", it should be a syntax error

https://codereview.chromium.org/811113002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to