The push-oriented implementation of Aho-Corasick returns an iterator over the matches it finds. The public regex API instead reports matches via callbacks. I'd like to see the public API also return an iterator.
Something like:
for match in scratch.push(bytes) {
// do things
}
A big question is how to handle scratch.finish, which consumes the scratch but also might return matches.
The push-oriented implementation of Aho-Corasick returns an iterator over the matches it finds. The public regex API instead reports matches via callbacks. I'd like to see the public API also return an iterator.
Something like:
A big question is how to handle
scratch.finish, which consumes the scratch but also might return matches.