Summary: | kate error on highlighting for cmake | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Matthew Woehlke <mwoehlke.floss> |
Component: | syntax | Assignee: | Matthew Woehlke <mwoehlke.floss> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matthew Woehlke
2009-11-02 20:52:17 UTC
From my own testing, it appears that CMake accepts '\"' outside of a string as not starting a string (that is, it is an escape outside of a string as well as inside). For what it's worth, vim has the same bug. (Also I am reasonably certain that the snippet code is not what the OP intended.) maybe something like this would be better for detecting the start of a string, if it's actually allowd to have \" outside of a string... - <DetectChar attribute="Strings" context="String" char="""/> + <RegExpr attribute="Strings" context="String" String="[^\\]""/> (Gee, that was quick :-)...) Nah, I'd rather avoid the regex. Besides, your example is wrong; it would have to be a look-back expression to be correct (and to not highlight too much). See http://reviewboard.kde.org/r/2043/ for my proposed fix (basically, copy the rule that detects '\"' to just before we would detect starting a string, as well as where it currently is, just before we would detect ending a string). SVN commit 1044075 by mwoehlke: improve cmake.xml Rearrange stuff to reduce rule duplication, and recognize '\"' as an escape outside of strings. BUG: 212798 REVIEW: 2043 M +8 -10 cmake.xml WebSVN link: http://websvn.kde.org/?view=rev&revision=1044075 |