debug_assert that progress is being made

This commit is contained in:
Eryn Wells 2017-04-08 16:11:44 -07:00
parent 4a0586b1a5
commit 8c83f884bf

View file

@ -553,7 +553,7 @@ impl Iterator for Lexer {
State::String => self.state_string(c), State::String => self.state_string(c),
State::StringEscape => self.state_string_escape(c), State::StringEscape => self.state_string_escape(c),
}; };
assert!(result.has_token() || self.forward != previous_forward, "No lexing progress made!"); debug_assert!(result.has_token() || self.forward != previous_forward, "No lexing progress made!");
if result.has_token() { if result.has_token() {
token = result.ok().unwrap(); token = result.ok().unwrap();
} }