forbid sub-rules
ClosedPublic

Authored by cullmann on Sep 2 2018, 2:32 PM.

Details

Summary

sub-rules are a hassle

they are only allowed for ints and floats

they can easily replaced with an extra context

I will patch all .xml files and forbid that, will make the implementation
much nicer, as that is the only place we allow any "endless" nesting
in the implementation

Test Plan

make && make test

> this is only the first part, need to finish all remaining .xml files

Diff Detail

Repository
R40 Kate
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 2 2018, 2:32 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 2 2018, 2:32 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Sep 2 2018, 2:32 PM

no objections to the idea, should indeed simplify things

cullmann updated this revision to Diff 40859.Sep 2 2018, 2:45 PM

more sub-rules replaced with contexts

cullmann updated this revision to Diff 40860.Sep 2 2018, 2:51 PM

converted all highlightings to use contexts instead of sub-rules

cullmann updated this revision to Diff 40862.Sep 2 2018, 2:58 PM

remove sub-rules support

now we do all things just with flat rules + flat contexts

cullmann updated this revision to Diff 40863.Sep 2 2018, 3:00 PM

fix comments in schema, no child rules

Done with all shipped things.

make && make test still works

Code is nicer, no nesting, we just can call doMatch, that btw. saves again 3-4% of overhead of ::match.

::load will skip over no longer supported sub-rules, beside minimal breakage for non-shipped hls, all should be fine (the suffixes will lack HL)

I will push this + adapt the kate.git docs for it.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 2 2018, 5:15 PM
Closed by commit R216:376311622d37: forbid sub-rules (authored by cullmann). · Explain Why
This revision was automatically updated to reflect the committed changes.
cullmann reopened this revision.Sep 2 2018, 5:15 PM

Need to update the docs.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 2 2018, 5:19 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application added a project: Documentation. · View Herald TranscriptSep 2 2018, 5:19 PM
Restricted Application added a subscriber: kde-doc-english. · View Herald Transcript

Documentation updated.
The regressions for highlightings outside the repo should be minimal, as we just ignore the suffix rules.