mirror of https://codeberg.org/topola/topola.git
fix(specctra/read): panic when return_token would override cached token
This commit is contained in:
parent
9ddc83e72a
commit
e493c16053
|
|
@ -311,6 +311,7 @@ impl<R: std::io::BufRead> ListTokenizer<R> {
|
|||
|
||||
// puts a token back into cache, to be consumed by something else
|
||||
pub fn return_token(&mut self, token: InputToken) {
|
||||
assert!(self.cached_token.is_none());
|
||||
self.cached_token = Some(token);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue