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

Authored by nibags on Sep 3 2019, 4:45 PM.

Description

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

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:

Reviewers: Framework: Syntax Highlighting, dhaumann, cullmann

Reviewed By: Framework: Syntax Highlighting, cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D23691

Details