On Mar 17, 2012, at 4:50 AM, Lasse Reichstein wrote:
> ...
> On the other hand, I agree that I can't point to a place in the spec
> where it says that you must throw a SyntaxError if you are unable to
> parse global code.
> If it's eval code, it throws in 15.1.2.1 step 2, and if it's an
> argument to the Function constructor, it throws in 15.3.2.1 step 8
> (i.e., where a String is parsed at runtime).
> In all other places, the spec assumes that both lexical and syntactic
> parsing succeeded, and describes what to do with the result. If it
> doesn't parse, the input isn't even ECMAScript, so presumably it's the
> surrounding system that must report an error.

see section 16.  Any syntax error is an "early error".  The process used to 
report early errors for a ECMAScript Program production is implementation 
defined (see note in section 14) except for the case you mention for eval 


Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to