== JSC ==
CONSOLE MESSAGE: line 1: SyntaxError: Parse error
== V8 ==
CONSOLE MESSAGE: line 1: Uncaught SyntaxError: Unexpected token <
Arguably V8 is in the wrong here, since JSC is the standard engine for WebKit. However, I think it's nice that V8 shows the token which is unexpected. Would be even better if both error messages told the column number (since clearly V8 has it and JSC should be able to get it).
This bug came up because we were asking the V8 team to change their errors to match JSC (to minimize chromium layout test differences). They noted that in this case their error is "better". I agree, that at least the "unexpected token" part is nice.
In then end, I don't personally care which engine's messages they both converge on, but it would unfork about a zillion layout test results if they were made identical.
In the case of this bug, v8 can change to be identical to JSC here, however I think JSC should probably also consider adding information about exact location of the syntax error.
You talk only about parse errors, or something in general? If it related only for parse error, I suggest to change the bug title.
Anyway, I think the recursive descent parser should be able handle it, the last token is still kept in the lexer after an error. If the others like the idea, I volunteer to implement the patch.
Let's start with parse errors, since those are pretty useful to web devs.
Any decision here? (It is not worth to start working on it before I hear the opinion of JSC developers. We need to decide the full format of syntax error as well)
*** This bug has been marked as a duplicate of bug 62613 ***