[Webkit-unassigned] [Bug 52079] Syntax errors should be early errors.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 11:34:55 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52079





--- Comment #9 from Gavin Barraclough <barraclough at apple.com>  2011-01-10 11:34:55 PST ---
(In reply to comment #8)
> (From update of attachment 78414 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=78414&action=review
> 
> You need to add tests for nested labels, so r- for that

Okay - will do - but I'm not sure what you want here -
    L1 : L2: statement?
Something like that?

> but also i don't believe that you're right to make L1: while(1) { L1: while(1) {}} an error so i want to know what justifies that decision.
> 
> > Source/JavaScriptCore/parser/JSParser.cpp:1264
> > +        failIfTrue(hasLabel(ident));
> 
> You have just made
> L1: while(...) { L1:  while (...) { ... } }
> 
> A syntax error, which it never was before.  What portion of the spec says that this is an error?

Sorry, I had a spec reference in a comment in an earlier form of the patch, will re add this.

Section 12.12 "An ECMAScript program is considered syntactically incorrect if it contains a LabelledStatement that is enclosed by a LabelledStatement with the same Identifier as label."

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list