::match and ::doMatch => const
ClosedPublic

Authored by cullmann on Sep 1 2018, 7:44 PM.

Details

Summary

make ::match and ::doMatch const
ATM the keyword list is still mutable (internal it uses mutable, too)

for isDynamic, we just construct a new regex if needed
that is nicer than working on the stored one

Test Plan

make && make test

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Sep 1 2018, 7:44 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 1 2018, 7:44 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Sep 1 2018, 7:44 PM
cullmann updated this revision to Diff 40834.Sep 1 2018, 7:46 PM

avoid duplicate storage of pattern

cullmann updated this revision to Diff 40835.Sep 1 2018, 8:25 PM

disallow dynamic for stuff we didn't implement

cullmann updated this revision to Diff 40836.Sep 1 2018, 8:29 PM

lower m_dynamic to the three rules that support it at all

vkrause accepted this revision.Sep 2 2018, 7:19 AM
This revision is now accepted and ready to land.Sep 2 2018, 7:19 AM
This revision was automatically updated to reflect the committed changes.

@cullmann Can you update the docbook in kate.git/doc/ so that the documentation about writing syntax highlighting files keeps up to date also for the dynamic changes?

Done: https://phabricator.kde.org/R40:7e3292bffc3012d20c0d4df2de0b1a8bab0ca886

Removed mentioning of "dynamic" for contexts, too, that is no longer used at all.

Should purge it from XSD, too.