Suppress syntax error after skip_balanced() fails

In this situation, skip_balanced() reports a useful error such as
(the '}' part varies depending what we're trying to skip over):

Error: Missing '}'. Reached end of input.

We now exit after such failures which avoids reporting a second more
generic error like:

Error: Syntax error in input(1).


Error: Syntax error in input(3).

Fixes #2606
6 files changed