Restores the given state back into the cache, and returns a pointer to it.
(&mut self, state: State)
| 1345 | /// Restores the given state back into the cache, and returns a pointer |
| 1346 | /// to it. |
| 1347 | fn restore_state(&mut self, state: State) -> Option<StatePtr> { |
| 1348 | // If we've already stored this state, just return a pointer to it. |
| 1349 | // None will be the wiser. |
| 1350 | if let Some(si) = self.cache.compiled.get_ptr(&state) { |
| 1351 | return Some(si); |
| 1352 | } |
| 1353 | self.add_state(state) |
| 1354 | } |
| 1355 | |
| 1356 | /// Returns the next state given the current state si and current byte |
| 1357 | /// b. {qcur,qnext} are used as scratch space for storing ordered NFA |
no test coverage detected