C & ISO C++: add digraphs (folding & preprocessor)
ClosedPublic

Authored by nibags on Sep 3 2019, 9:02 AM.

Details

Summary

BUG: 411508

ISO C ++

  • Add folding for digraphs <%, %>, <: and :>, which are equivalent to {, }, [ and ].
  • Fix the highlight of %: in preprocessor, for example, %:include <some>.

C

  • Add folding for digraphs <% and %>, which are equivalent to { and }.
  • Add %: equivalent to # in preprocessor.

Trigraphs were removed in C++17 and are supported in C (if activated in the compiler), but are almost obsolete. That's why I decided not to add them. Although if you wish I can add folding to ??< and ??>, which are equivalent to { and }.

More:

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.
nibags created this revision.Sep 3 2019, 9:02 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 3 2019, 9:02 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Sep 3 2019, 9:02 AM
nibags edited the summary of this revision. (Show Details)Sep 3 2019, 9:04 AM
cullmann accepted this revision.Sep 3 2019, 4:42 PM

I think di-graphs are good enough, tri-graphs are ancient cruft.

This revision is now accepted and ready to land.Sep 3 2019, 4:42 PM

Btw., BIG thanks for taking care of all this highlighting issues!

This revision was automatically updated to reflect the committed changes.