Allocates room for one additional state and returns a pointer to it. If there's no more room, None is returned.
(&mut self)
| 1689 | /// |
| 1690 | /// If there's no more room, None is returned. |
| 1691 | fn add(&mut self) -> Option<StatePtr> { |
| 1692 | let si = self.table.len(); |
| 1693 | if si > STATE_MAX as usize { |
| 1694 | return None; |
| 1695 | } |
| 1696 | self.table.extend(repeat(STATE_UNKNOWN).take(self.num_byte_classes)); |
| 1697 | Some(usize_to_u32(si)) |
| 1698 | } |
| 1699 | |
| 1700 | /// Clears the table of all states. |
| 1701 | fn clear(&mut self) { |
no test coverage detected