properly failing when the very first token causes a syntax error (as
opposed to crashing while trying to read fields of an undefined value)