oh, somehow I totally missed the 'while (true)' at the end of that snippet -- so I retract the SyntaxError thing. but yeah, would be a do-while loop
> On Feb 22, 2016, at 12:22 PM, Claude Pache <[email protected]> wrote: > > >> Le 22 févr. 2016 à 17:47, Bradley Meck <[email protected]> a écrit : >> >> Does that mean the following would parse as a do expression? >> >> ```javascript >> function foo () { >> return >> do { >> 1; >> } >> while (true); >> } >> ``` > > No, because `return` cannot be followed be a LineTerminator, so that ASI will > introduce a semicolon after it. > > This is the same issue as: > > ```js > function foo() { > return // an implied semicolon is inserted here > { bar: 1 }; // interpreted as a block, not as an object literal > } > ``` > > —Claude _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

