Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cases to existing tests that correctly handle empty strings as input. In this case, the lexer was setting its state function to nil after returning an EOF. This resulted in a nil function call if the parser calls `nextToken` repeatedly on the lexer. Instead of setting the state function to `nil` after emitting an EOF, set the state function to `lexLineStart`. This allows `nextToken` to be called on a lexer repeatedly after it has already emitted an EOF. It will simply emit an EOF token again.
- Loading branch information