|Summary:||Pattern matcher should support delegation|
|Product:||WebKit||Reporter:||Filip Pizlo <fpizlo>|
|Version:||WebKit Nightly Build|
|Bug Depends on:|
Description Filip Pizlo 2015-10-26 09:48:55 PDT
Currently, if you write two pattern matchers and you implement one by sometimes using the other as a helper, then the helper will return the first match that works for it regardless of what the outer matcher wants. For example, the outer matcher might want any address except for Index, and so it might want to use the address matcher but somehow tell it "please skip anything that produces Index". But this is currently hard. You'd have to manually set some state on the address matcher that tells it what kinds of things to filter out, and write code in the address matcher that applies the filter. It would be better if this was easier to do. For example, when you runAddressMatcher, you could provide a functor that filters the results of the address matcher. This could be made even better if matchers returned a value rather than void.
Comment 1 Filip Pizlo 2015-11-11 10:49:12 PST
We got rid of the pattern matcher.