Fix CMake COMMAND nested paren highlighting
ClosedPublic

Authored by smokris on Jun 25 2019, 6:32 PM.

Details

Summary

The CMake syntax highlighter was getting confused by balanced
parentheses in several functions' COMMAND arguments.
This patch turns on the 'nested-parentheses' flag for those
commands, enabling parentheses to be parsed correctly.

Test Plan

Added tests in autotests/input/highlight.cmake and updated the corresponding reference output files.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Lint Skipped
Unit
Unit Tests Skipped
smokris created this revision.Jun 25 2019, 6:32 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJun 25 2019, 6:32 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
smokris requested review of this revision.Jun 25 2019, 6:32 PM
cullmann accepted this revision.Jun 25 2019, 7:48 PM
cullmann added a subscriber: cullmann.

Looks reasonable to me. Thanks!

This revision is now accepted and ready to land.Jun 25 2019, 7:48 PM

Ah, I missed: the version should be updated.

smokris updated this revision to Diff 60669.Jun 25 2019, 7:54 PM

Updated cmake.xml + cmake.xml.tpl version number.

turbov added a subscriber: turbov.Jun 26 2019, 8:15 AM

I would say all commands w/ COMMAND named parameter need that. Also, add_custrom_target and execute_process...

smokris updated this revision to Diff 60819.Jun 29 2019, 2:56 AM
smokris retitled this revision from Fix CMake add_custom_command() paren highlighting to Fix CMake COMMAND nested paren highlighting.
smokris edited the summary of this revision. (Show Details)
smokris edited the test plan for this revision. (Show Details)

Ah, yes. Here's a revised patch that also applies that change (and adds tests) for add_custom_target, execute_process, and add_test.

cullmann accepted this revision.Jul 3 2019, 6:17 PM

Then we merge this ;=)

This revision was automatically updated to reflect the committed changes.