D23691: C & ISO C++: add digraphs (folding & preprocessor)
Nibaldo González
noreply at phabricator.kde.org
Tue Sep 3 10:02:51 BST 2019
nibags created this revision.
nibags added reviewers: Framework: Syntax Highlighting, dhaumann, cullmann.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.
REVISION SUMMARY
BUG: 411508
1. ISO C ++
- Add folding for digraphs `<%`, `%>`, `<:` and `:>`, which are equivalent to `{`, `}`, `[` and `]`.
- Fix the highlight of `%:` in preprocessor, for example, `%:include <some>`.
1. 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:**
- https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C
REPOSITORY
R216 Syntax Highlighting
BRANCH
cpp-digraphs
REVISION DETAIL
https://phabricator.kde.org/D23691
AFFECTED FILES
autotests/folding/highlight.cpp.fold
autotests/folding/test.c.fold
autotests/html/highlight.cpp.html
autotests/html/test.c.html
autotests/input/highlight.cpp
autotests/input/test.c
autotests/reference/highlight.cpp.ref
autotests/reference/test.c.ref
data/syntax/c.xml
data/syntax/isocpp.xml
To: nibags, #framework_syntax_highlighting, dhaumann, cullmann
Cc: kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190903/0506a896/attachment.html>
More information about the Kde-frameworks-devel
mailing list