[Webkit-unassigned] [Bug 23611] New: Multiline Javascript comments cause incorrect parsing of following script.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 28 21:44:38 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=23611
Summary: Multiline Javascript comments cause incorrect parsing of
following script.
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
URL: http://bugs.ecmascript.org/ticket/414
OS/Version: All
Status: UNCONFIRMED
Severity: Minor
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: msamuel at google.com
Chapter 5.1.2 of the recently approved ES3.1 spec, and the corresponding
language from ES 262 say
"A MultiLineComment? (that is, a comment of the form "/* ... */" regardless of
whether it spans more than one line) is likewise simply discarded if it
contains no line terminator, but if a MultiLineComment? contains one or more
line terminators, then it is replaced with a single line terminator, which
becomes part of the stream of inputs for the syntactic grammar."
But the below returns 2 on Safari, when it should return 1.
(function () { a: for (;;) { for (;;) { break/*
*/a; } return 1; } return 2; })()
By way of explanation, the comment between break and a should introduce a
newline, which since break is a restricted production, should cause it to break
without a label (out of the inner loop), instead of breaking to the label a
(the outer loop).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list