Bug 461151

Summary: CMake highlights correct parenthesis as dsError
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Lukas Sommer <sommerluk>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: walter.von.entferndt
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Lukas Sommer 2022-10-29 10:56:33 UTC
SUMMARY
CMake highlights correct parenthesis as dsError



STEPS TO REPRODUCE
Use the following CMakeLists.txt:

if( true AND ( false OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") ) )
    add_compile_options(-Wall)
endif()



OBSERVED RESULT
The last character in the first line, which is the closing parenthesis of “if()”, is highlighted as dsError.



EXPECTED RESULT
The last character in the first line, which is the closing parenthesis of “if()”, is highlighted as a normal parenthesis.
Comment 1 Bug Janitor Service 2022-11-01 21:39:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/378
Comment 2 Christoph Cullmann 2022-11-03 19:57:01 UTC
Git commit 5fb7a8c4847814c51490fc20f640e1c7285632d1 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 03/11/2022 at 19:43.
Pushed by cullmann into branch 'master'.

CMake: fix nested parentheses highlinthing

M  +4    -0    autotests/folding/highlight.cmake.fold
M  +4    -0    autotests/html/highlight.cmake.dark.html
M  +4    -0    autotests/html/highlight.cmake.html
M  +4    -0    autotests/input/highlight.cmake
M  +4    -0    autotests/reference/highlight.cmake.ref
M  +1    -0    data/generators/cmake.xml.tpl
M  +1    -1    data/generators/cmake.yaml
M  +1    -1    data/generators/generate-cmake-syntax.py
M  +8    -1    data/syntax/cmake.xml

https://invent.kde.org/frameworks/syntax-highlighting/commit/5fb7a8c4847814c51490fc20f640e1c7285632d1