D7175: Redesign CMake syntax

Alex Turbov noreply at phabricator.kde.org
Mon Aug 7 06:20:40 UTC 2017


turbov created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  CMake syntax has been redesigned to pursue the following goals:
  
  - the former generator has used an output of `cmake --help` (and friends) commands, which is quite informal (not a well formed) and error prune
  - the current syntax was really out of date
  
  The new approach is to use a trivial Python script, which uses a prepared YAML data file and Jinja template to render the resulting syntax file.
  Key features of the new implementation are:
  
  - every command highlight only related named parameters -- e.g. `add_library` do not have `TARGET` named option, so it doesn't highlighted in this context
  - new highlight classes has introduced to distinct property names, aliased (imported) targets, special non-named arguments...
  - reuse RST syntax for comments
  - input data now in VCS and trackable
  
  there is still some work to do, but I've just want to know is there any interest in this approach...

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D7175

AFFECTED FILES
  data/generators/cmake-gen.sh
  data/generators/cmake.xml.tpl
  data/generators/cmake.yaml
  data/generators/generate-cmake-syntax.py
  data/syntax/cmake.xml

To: turbov
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170807/37b040f9/attachment.html>


More information about the Kde-frameworks-devel mailing list