RFE: Allow newline when returning an anonymous object
brendan at mozilla.org
Wed May 28 12:06:46 PDT 2014
Tab Atkins Jr. wrote:
> Remember the general rule: semicolons are always automatically
> inserted at the end of lines*unless* doing so would cause a syntax
> error on that line or the next.
No, this is not accurate. Consider
Inserting a semicolon as you wrote:
does not make a syntax error, but it is not what ASI does, and doing so
would break valid JS programs.
ASI is an error correction procedure plus those "restricted productions"
(including the return statement's production).
More information about the es-discuss