Fixed a bug in the lexer that caused a crash.

The lexer contained a bug that caused it to crash it it was presented
with an empty line with no tokens before it. This bug has been fixed.