On Sat, Dec 16, 2017 at 4:35 PM, 'Mathias Bynens' via v8-users <
[email protected]> wrote:

>
> On Fri, Dec 15, 2017 at 4:44 PM, J Decker <[email protected]> wrote:
>
>> The code below comes from ScanString()
>> I noticed that if the scanner encounters a '\' before a c0 > kMaxAscii
>> HandleLeadSurrogate() (0xd800+0xdc00 surrogate handling) is no longer done.
>>
>> I tried to make a test file that had such things, but node failed to read
>> utf-16 encoded file even with BOM marks...
>>
>
> I’m not sure what you mean exactly, but it sounds like you could use
> `eval()` to test this more directly.
>
>
>> But also, if there is no backslash, then PS and LS (0x2028, 0x2029)
>> characters are not considered valid line ending and would be stored in the
>> string literal.... (IsLineTerminator test)
>>
>
> This doesn’t seem to be the case:
>
> $ rlwrap v8
> V8 version 6.5.20
> d8> eval('"a\u2028b"')
> undefined:1: SyntaxError: Invalid or unexpected token
> "a
> ^^
> SyntaxError: Invalid or unexpected token
>     at (d8):1:1
>

I see; that ends up being > kMaxAscii which I missed; and the other case
Advance() ends up doing the handle lead surrage internally. Got it; thanx.


>
>> --
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-users" 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.
>>
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" 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.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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