Re: ES4 draft last call: line continuation in string and regex literals
Lars Hansen wrote: >>> The character sequence BACKSLASH (where >>> will be one of the characters LF, LS, or PS) is >>> removed from string literals delimited by either single or triple >>> SINGLEQUOTE or DOUBLEQUOTE characters. (Triple-quoting is >> defined in >>> [5].) >> This states that: >> >> "abc\\ >> tde" >> >> evaluates to the string "abcde". >> >> Is this really what we want? I'd find such nested escape >> sequences really strange. > > That looks like an illegal token to me, since the lexer will read "a" > "b" "c" "\" and then see an unescaped linefeed. > > Since the speclet states nothing about changing the way strings are > lexed, normal escape character processing should be in effect, and that > dictates that \\ is processed into \ independently of what follows. It's what we all want. As written, that's not what it states. This isn't ready to go in until this bug is corrected. Waldemar ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
RE: ES4 draft last call: line continuation in string and regex literals
> -Original Message- > From: Waldemar Horwat [mailto:[EMAIL PROTECTED] > Sent: 10. mars 2008 18:59 > To: Lars Hansen > Cc: es4-discuss Discuss > Subject: Re: ES4 draft last call: line continuation in string > and regex literals > > > The character sequence BACKSLASH (where > > will be one of the characters LF, LS, or PS) is > > removed from string literals delimited by either single or triple > > SINGLEQUOTE or DOUBLEQUOTE characters. (Triple-quoting is > defined in > > [5].) > > This states that: > > "abc\\ > tde" > > evaluates to the string "abcde". > > Is this really what we want? I'd find such nested escape > sequences really strange. That looks like an illegal token to me, since the lexer will read "a" "b" "c" "\" and then see an unescaped linefeed. Since the speclet states nothing about changing the way strings are lexed, normal escape character processing should be in effect, and that dictates that \\ is processed into \ independently of what follows. --lars ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: ES4 draft last call: line continuation in string and regex literals
> The character sequence BACKSLASH (where > will be one of the characters LF, LS, or PS) is removed from string literals > delimited by either single or triple SINGLEQUOTE or DOUBLEQUOTE characters. > (Triple-quoting is defined in [5].) This states that: "abc\\ tde" evaluates to the string "abcde". Is this really what we want? I'd find such nested escape sequences really strange. Waldemar ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: ES4 draft last call: line continuation in string and regex literals
On Mar 8, 2008, at 8:20 AM, Lars Hansen wrote: > Last call for the line continuation spec: > > http://wiki.ecmascript.org/doku.php?id=spec:line_continuation_in_strings > > ("Last call" = it will be taken into the language spec within a week > or > so unless there's opposition now.) This (and the line terminator normalization draft) seem to be in restricted parts of the wiki. Could they go somewhere public? - Maciej ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
ES4 draft last call: line continuation in string and regex literals
Last call for the line continuation spec: http://wiki.ecmascript.org/doku.php?id=spec:line_continuation_in_strings ("Last call" = it will be taken into the language spec within a week or so unless there's opposition now.) --lars ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss