Subj : Re: SpiderMonkey: newline in script important? To : netscape.public.mozilla.jseng From : jim@jibbering.com (Jim Ley) Date : Wed Jan 15 2003 10:05 pm On Wed, 15 Jan 2003 09:39:13 -0800, Brendan Eich wrote: >Franky Braem wrote: > >>Well I found the answer in a JavaScript reference. A ; is mandatory when >>using an anonymous function. >>So the compiler in SpiderMonkey is wrong when it allows anonymous functions >>only ended with a carriage return after the } >> > >See ECMA-262 Edition 3 Chapter 16. Implementations are allowed to >extend the standard to handle errors in program and regular expression >syntax. > >SpiderMonkey has been inserting semicolons automatically in this case >for a long time; I don't think I can change it to require a semicolon at >this late date. I also think this is an extension to be encouraged, it's unlikely to cause a problem (I certainly can't think of a scenario?) Jim. .