Fix some bugs in object parsing.

0795bfa `statement` consumes semicolons but doesn't add anything to `values` so the error gets thrown when it shouldn't.
29bde7f The same error gets thrown when eof is encountered inside an object, when instead it should require a closing brace.