[gtksourceview] cmake.lang: add highlighting for quoted arguments



commit f030c3a9f7efa553d9dc7c892fd5292dd7a3ad9e
Author: Роман Донченко <dpb corrigendum ru>
Date:   Sun Nov 12 19:17:44 2017 +0300

    cmake.lang: add highlighting for quoted arguments
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790345

 data/language-specs/cmake.lang |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/cmake.lang b/data/language-specs/cmake.lang
index 71dba4d..426b653 100644
--- a/data/language-specs/cmake.lang
+++ b/data/language-specs/cmake.lang
@@ -34,6 +34,7 @@
     <style id="operator" name="Operator" map-to="def:operator"/>
     <style id="control" name="Control Keyword" map-to="def:keyword"/>
     <style id="variable" name="Variable" map-to="makefile:variable"/>
+    <style id="quoted-argument" name="Quoted Argument" map-to="def:string"/>
   </styles>
 
   <definitions>
@@ -724,6 +725,19 @@
       </include>
     </context>
 
+    <context id="quoted-argument" style-ref="quoted-argument">
+      <start>"</start>
+      <end>"</end>
+      <include>
+        <context ref="variable-reference"/>
+        <context ref="env-variable-reference"/>
+        <context style-ref="def:special-char">
+          <match>\\$</match> <!-- quoted_continuation from the grammar -->
+        </context>
+        <context ref="escape-sequence"/>
+      </include>
+    </context>
+
     <context id="variable-assignment">
       <start>\b((?i)SET)\b\s*\(\s*([\w_][\w\d_]*)</start>
       <end>\)</end>
@@ -733,6 +747,7 @@
         <context ref="variable-reference"/>
         <context ref="env-variable-reference"/>
         <context ref="constant"/>
+        <context ref="quoted-argument"/>
         <context ref="def:shell-like-comment"/>
       </include>
     </context>
@@ -741,6 +756,7 @@
       <include>
         <context ref="variable-reference"/>
         <context ref="env-variable-reference"/>
+        <context ref="quoted-argument"/>
         <context ref="variable-assignment"/>
         <context ref="def:shell-like-comment"/>
         <context ref="constant"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]