optimize dynamic regex matching
Summary:
allow such matches to be cached, too, by guarding the cache
with the last used captures
makes VHDL highlighting instantanious for bug 418778
BUG: 418778
Test Plan:
make && make test
example from bug 418778 is fast!
Reviewers: dhaumann, vkrause, nibags
Reviewed By: dhaumann
Subscribers: mwolff, kwrite-devel, kde-frameworks-devel
Tags: Kate, Frameworks
Differential Revision: https://phabricator.kde.org/D28039