ES4 draft last call: line continuation in string and regexliterals
jodyer at adobe.com
Mon Mar 10 18:31:50 PDT 2008
> -----Original Message-----
> From: es4-discuss-bounces at mozilla.org [mailto:es4-discuss-
> bounces at mozilla.org] On Behalf Of Waldemar Horwat
> Sent: Monday, March 10, 2008 6:29 PM
> To: Lars Hansen
> Cc: es4-discuss Discuss
> Subject: Re: ES4 draft last call: line continuation in string and
> Lars Hansen wrote:
> >>> The character sequence BACKSLASH <lineterminator> (where
> >>> <lineterminator> 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
> >>> .)
> >> This states that:
> >> "abc\\
> >> tde"
> >> evaluates to the string "abc<tab>de".
> >> 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
> > "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
> > dictates that \\ is processed into \ independently of what follows.
> It's what we all want. As written, that's not what it states. This
> ready to go in until this bug is corrected.
Waldemar, can you suggest a fix?
More information about the Es4-discuss