(Just one opinion)
I'm all in favor of function-level parse errors. This reminds me an article
of Ian Hickson where he wondered why, to the contrary of CSS, the ECMAScript
language didn't define a generic syntax defining a well-formed program
(tokens, parenthesis+brackets balance, ...) and which would replace any
block he didn't understand by a { throw ParseError() } block.
function A() {
ooops {
return 3;
}
}
would be the same as
function() {
do { throw new ParseError("..."); }
}
I don't say we need to go that far (in fact, ASI probably makes it
impossible), but any progress made to more modularity and lazy compilation
is good to take.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss