Parse everything up to function bodies and report parser errors with location.