[gtksourceview] cmake.lang: add highlighting for bracket comments



commit 2eed8cbe3cccd4e2aa852ae3715401049e83142d
Author: Роман Донченко <dpb corrigendum ru>
Date:   Sun Nov 12 20:00:40 2017 +0300

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

 data/language-specs/cmake.lang |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/cmake.lang b/data/language-specs/cmake.lang
index 0c0819e..17ccf6d 100644
--- a/data/language-specs/cmake.lang
+++ b/data/language-specs/cmake.lang
@@ -24,6 +24,8 @@
   <metadata>
     <property name="globs">CMakeLists.txt;*.cmake;*.cmake.in;*.ctest;*.ctest.in</property>
     <property name="line-comment-start">#</property>
+    <property name="block-comment-start">#[[</property>
+    <property name="block-comment-end">]]</property>
   </metadata>
 
   <styles>
@@ -744,6 +746,14 @@
       <end>\]\%{1@start}\]</end>
     </context>
 
+    <context id="bracket-comment" style-ref="def:comment" class="comment" class-disabled="no-spell-check">
+      <start>#\[(=*)\[</start>
+      <end>\]\%{1@start}\]</end>
+      <include>
+        <context ref="def:in-comment"/>
+      </include>
+    </context>
+
     <context id="variable-assignment">
       <start>\b((?i)SET)\b\s*\(\s*([\w_][\w\d_]*)</start>
       <end>\)</end>
@@ -755,6 +765,7 @@
         <context ref="constant"/>
         <context ref="quoted-argument"/>
         <context ref="bracket-argument"/>
+        <context ref="bracket-comment"/>
         <context ref="def:shell-like-comment"/>
       </include>
     </context>
@@ -766,6 +777,7 @@
         <context ref="quoted-argument"/>
         <context ref="bracket-argument"/>
         <context ref="variable-assignment"/>
+        <context ref="bracket-comment"/>
         <context ref="def:shell-like-comment"/>
         <context ref="constant"/>
         <context ref="builtin-command"/>


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