do-while grammar

Dave Fugate dfugate at microsoft.com
Tue Feb 8 12:58:31 PST 2011


Thanks for the info guys!

My best,

Dave

From: André Bargull [mailto:andre.bargull at udo.edu]
Sent: Tuesday, February 08, 2011 12:12 PM
To: ggaren at apple.com
Cc: Dave Fugate; es-discuss
Subject: Re: do-while grammar

Just for the record, here's a link to the bug report on bugzilla concerning ASI for do-while:
https://bugzilla.mozilla.org/show_bug.cgi?id=238945

(Interesting that I came across the very same issue in January while working on the OpenLaszlo parser code :-)


FWIW, JavaScriptCore provides automatic semicolon insertion after all do-while statements in all contexts. We made this change for web compatibility, mimicking a Firefox quirk.

Geoff

On Feb 8, 2011, at 11:53 AM, Dave Fugate wrote:


Just to confirm, do-while iteration statements do in fact require a semi-colon at the end as indicated in 12.6.1 of ES5, correct?  That is, a production of the nature:
                do {;} while (false) false;

would be invalid JavaScript as doesn't meet any of the three rules set out in 7.9.1,  right?

Thanks,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110208/f56901e6/attachment.html>


More information about the es-discuss mailing list