Found a bug in next_semicolon. Writing those tests helped to find the bug.