* SUMMARY Improve unexpected end of script parse error, include expected token. The generic "Unexpected end of script" / "Unexpected EOF" errors could be more helpful, and inform what token was missing / expected. Some examples: • inside of function parameter list missing a trailing ')' • inside of a block, missing a trailing '}' • inside of a string/template string, missing the trailing quote * TESTS jsc> print(1 ... Unexpected end of script:3 jsc> if (1) { ... Unexpected end of script:3 jsc> `test ... Unexpected EOF:2 jsc> 'test Unexpected EOF:1 jsc> [1 ... Unexpected end of script:3
Another example. Forgetting to close an array literal. jsc> [1, ... Unexpected end of script:3
<rdar://problem/24043285>
*** Bug 153349 has been marked as a duplicate of this bug. ***