Bug 402002 - c syntax fails to color constant after ~
Summary: c syntax fails to color constant after ~
Status: VERIFIED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-11 13:08 UTC by Jan Pohland
Modified: 2019-04-25 08:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pohland 2018-12-11 13:08:13 UTC
SUMMARY
the c.xml syntax definition fails to color a constant after ~ (bitwise complement/compl) 

STEPS TO REPRODUCE
1. open editor which uses the c.xml syntax file with default theme
2. highlight the expression x = ~1

OBSERVED RESULT
the "1" is colored black

EXPECTED RESULT
Like in -1, the 1 should be marked like a constant (DecVal?)


ADDITIONAL INFORMATION
For c++, it works
Comment 1 Christoph Cullmann 2018-12-12 09:42:49 UTC
More issues are things like 0x1.5p+2

We should reuse the isocpp code.
Comment 2 Christoph Cullmann 2018-12-12 09:44:37 UTC
https://phabricator.kde.org/D17530
Comment 3 Christoph Cullmann 2018-12-12 13:32:08 UTC
Git commit ea5a88d1df2881f2ea60d850713aab8a59a5c4d5 by Christoph Cullmann.
Committed on 12/12/2018 at 09:44.
Pushed by cullmann into branch 'master'.

improve highlighting of complex numbers

Summary:
CHANGELOG: support more variants of C number literals

Test Plan: adapted unit tests to cover problematic cases

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

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

M  +2    -2    autotests/folding/test.c.fold
M  +5    -5    autotests/html/test.c.html
M  +2    -2    autotests/input/test.c
M  +5    -5    autotests/reference/test.c.ref
M  +50   -28   data/syntax/c.xml

https://commits.kde.org/syntax-highlighting/ea5a88d1df2881f2ea60d850713aab8a59a5c4d5
Comment 4 Christoph Cullmann 2018-12-12 13:34:13 UTC
Should be fixed, merged it back to the AbsInt mirror, too ;=)
Comment 5 Jan Pohland 2019-04-25 08:58:36 UTC
works fine, thanks!