[gtksourceview] lang-tutorial: 2-spaces indentation



commit a7ae52c4ede21ef530301ca01b7e74e5dc8c20e8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Sep 13 13:41:45 2013 +0200

    lang-tutorial: 2-spaces indentation

 docs/reference/lang-tutorial.xml |  394 +++++++++++++++++++-------------------
 1 files changed, 195 insertions(+), 199 deletions(-)
---
diff --git a/docs/reference/lang-tutorial.xml b/docs/reference/lang-tutorial.xml
index 371e184..63379dd 100644
--- a/docs/reference/lang-tutorial.xml
+++ b/docs/reference/lang-tutorial.xml
@@ -139,7 +139,7 @@ Following the <code>&lt;styles&gt;</code> element there is the
 <code>&lt;definitions&gt;</code> element, which contains the 
 description proper of the syntax:
 </para>
-        
+
 <programlisting>
 &lt;definitions&gt;
 </programlisting>
@@ -172,8 +172,8 @@ start with a double slash <code>//</code> and end at the end of the line:
 
 <programlisting>
 &lt;context id="comment" style-ref="comment"&gt;
-    &lt;start&gt;\/\/&lt;/start&gt;
-    &lt;end&gt;$&lt;/end&gt;
+  &lt;start&gt;\/\/&lt;/start&gt;
+  &lt;end&gt;$&lt;/end&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -253,8 +253,7 @@ we don't end the string prematurely:
 </para>
 
 <programlisting>
-&lt;context id="string" end-at-line-end="true"
-        style-ref="string"&gt;
+&lt;context id="string" end-at-line-end="true" style-ref="string"&gt;
 </programlisting>
 
 <para>
@@ -274,9 +273,9 @@ To implement the escape handling we include a <code>escape</code> context:
 </para>
 
 <programlisting>
-    &lt;context id="escape" style-ref="escaped-character"&gt;
-        &lt;match&gt;\\.&lt;/match&gt;
-    &lt;/context&gt;
+  &lt;context id="escape" style-ref="escaped-character"&gt;
+    &lt;match&gt;\\.&lt;/match&gt;
+  &lt;/context&gt;
 </programlisting>
 
 <para>
@@ -299,11 +298,10 @@ internet address contained:
 
 <programlisting>
 &lt;context id="comment-multiline" style-ref="comment"&gt;
-    &lt;start&gt;\/\*&lt;/start&gt;
-    &lt;end&gt;\*\/&lt;/end&gt;
-    &lt;include&gt;
-        &lt;context id="net-address" style-ref="net-address"
-                 extend-parent="false"&gt;
+  &lt;start&gt;\/\*&lt;/start&gt;
+  &lt;end&gt;\*\/&lt;/end&gt;
+  &lt;include&gt;
+    &lt;context id="net-address" style-ref="net-address" extend-parent="false"&gt;
 </programlisting>
 
 <para>
@@ -312,9 +310,9 @@ found, so we use <code>false</code> in the <code>extend-parent</code> attribute.
 </para>
 
 <programlisting>
-            &lt;match&gt;http:\/\/[^\s]*&lt;/match&gt;
-        &lt;/context&gt;
-    &lt;/include&gt;
+      &lt;match&gt;http:\/\/[^\s]*&lt;/match&gt;
+    &lt;/context&gt;
+  &lt;/include&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -338,10 +336,10 @@ contain escaped characters:
 
 <programlisting>
 &lt;context id="char" end-at-line-end="true" style-ref="string"&gt;
-    &lt;start&gt;'&lt;/start&gt;
-    &lt;end&gt;'&lt;/end&gt;
-    &lt;include&gt;
-        &lt;context ref="escape"/&gt;
+  &lt;start&gt;'&lt;/start&gt;
+  &lt;end&gt;'&lt;/end&gt;
+  &lt;include&gt;
+    &lt;context ref="escape"/&gt;
 </programlisting>
 
 <para>
@@ -351,7 +349,7 @@ context, without repeating its definition.
 </para>
 
 <programlisting>
-    &lt;/include&gt;
+  &lt;/include&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -380,14 +378,14 @@ our <code>comment-multiline</code> context that uses the definitions from <code>
 
 <programlisting>
 &lt;context id="comment-multiline" style-ref="comment"&gt;
-    &lt;start&gt;\/\*&lt;/start&gt;
-    &lt;end&gt;\*\/&lt;/end&gt;
-    &lt;include&gt;
-        &lt;context ref="def:in-comment"/&gt;
+  &lt;start&gt;\/\*&lt;/start&gt;
+  &lt;end&gt;\*\/&lt;/end&gt;
+  &lt;include&gt;
+    &lt;context ref="def:in-comment"/&gt;
 </programlisting>
 
 <programlisting>
-    &lt;/include&gt;
+  &lt;/include&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -398,19 +396,19 @@ elements:
 
 <programlisting>
 &lt;context id="keywords" style-ref="keyword"&gt;
-    &lt;keyword&gt;if&lt;/keyword&gt;
-    &lt;keyword&gt;else&lt;/keyword&gt;
-    &lt;keyword&gt;for&lt;/keyword&gt;
-    &lt;keyword&gt;while&lt;/keyword&gt;
-    &lt;keyword&gt;return&lt;/keyword&gt;
-    &lt;keyword&gt;break&lt;/keyword&gt;
-    &lt;keyword&gt;switch&lt;/keyword&gt;
-    &lt;keyword&gt;case&lt;/keyword&gt;
-    &lt;keyword&gt;default&lt;/keyword&gt;
-    &lt;keyword&gt;do&lt;/keyword&gt;
-    &lt;keyword&gt;continue&lt;/keyword&gt;
-    &lt;keyword&gt;goto&lt;/keyword&gt;
-    &lt;keyword&gt;sizeof&lt;/keyword&gt;
+  &lt;keyword&gt;if&lt;/keyword&gt;
+  &lt;keyword&gt;else&lt;/keyword&gt;
+  &lt;keyword&gt;for&lt;/keyword&gt;
+  &lt;keyword&gt;while&lt;/keyword&gt;
+  &lt;keyword&gt;return&lt;/keyword&gt;
+  &lt;keyword&gt;break&lt;/keyword&gt;
+  &lt;keyword&gt;switch&lt;/keyword&gt;
+  &lt;keyword&gt;case&lt;/keyword&gt;
+  &lt;keyword&gt;default&lt;/keyword&gt;
+  &lt;keyword&gt;do&lt;/keyword&gt;
+  &lt;keyword&gt;continue&lt;/keyword&gt;
+  &lt;keyword&gt;goto&lt;/keyword&gt;
+  &lt;keyword&gt;sizeof&lt;/keyword&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -421,21 +419,21 @@ possible to highlight them differently:
 
 <programlisting>
 &lt;context id="types" style-ref="type"&gt;
-    &lt;keyword&gt;char&lt;/keyword&gt;
-    &lt;keyword&gt;const&lt;/keyword&gt;
-    &lt;keyword&gt;double&lt;/keyword&gt;
-    &lt;keyword&gt;enum&lt;/keyword&gt;
-    &lt;keyword&gt;float&lt;/keyword&gt;
-    &lt;keyword&gt;int&lt;/keyword&gt;
-    &lt;keyword&gt;long&lt;/keyword&gt;
-    &lt;keyword&gt;short&lt;/keyword&gt;
-    &lt;keyword&gt;signed&lt;/keyword&gt;
-    &lt;keyword&gt;static&lt;/keyword&gt;
-    &lt;keyword&gt;struct&lt;/keyword&gt;
-    &lt;keyword&gt;typedef&lt;/keyword&gt;
-    &lt;keyword&gt;union&lt;/keyword&gt;
-    &lt;keyword&gt;unsigned&lt;/keyword&gt;
-    &lt;keyword&gt;void&lt;/keyword&gt;
+  &lt;keyword&gt;char&lt;/keyword&gt;
+  &lt;keyword&gt;const&lt;/keyword&gt;
+  &lt;keyword&gt;double&lt;/keyword&gt;
+  &lt;keyword&gt;enum&lt;/keyword&gt;
+  &lt;keyword&gt;float&lt;/keyword&gt;
+  &lt;keyword&gt;int&lt;/keyword&gt;
+  &lt;keyword&gt;long&lt;/keyword&gt;
+  &lt;keyword&gt;short&lt;/keyword&gt;
+  &lt;keyword&gt;signed&lt;/keyword&gt;
+  &lt;keyword&gt;static&lt;/keyword&gt;
+  &lt;keyword&gt;struct&lt;/keyword&gt;
+  &lt;keyword&gt;typedef&lt;/keyword&gt;
+  &lt;keyword&gt;union&lt;/keyword&gt;
+  &lt;keyword&gt;unsigned&lt;/keyword&gt;
+  &lt;keyword&gt;void&lt;/keyword&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -446,7 +444,7 @@ You can also set a prefix (or a suffix) common to every keyword using the
 
 <programlisting>
 &lt;context id="preprocessor" style-ref="preprocessor"&gt;
-    &lt;prefix&gt;^#&lt;/prefix&gt;
+  &lt;prefix&gt;^#&lt;/prefix&gt;
 </programlisting>
 
 <para>
@@ -456,8 +454,8 @@ are set to, respectively, <code>\%[</code> and
 </para>
 
 <programlisting>
-    &lt;keyword&gt;define&lt;/keyword&gt;
-    &lt;keyword&gt;undef&lt;/keyword&gt;
+  &lt;keyword&gt;define&lt;/keyword&gt;
+  &lt;keyword&gt;undef&lt;/keyword&gt;
 </programlisting>
 
 <para>
@@ -465,10 +463,10 @@ Keep in mind that every keyword is a regular expression:
 </para>
 
 <programlisting>
-    &lt;keyword&gt;if(n?def)?&lt;/keyword&gt;
-    &lt;keyword&gt;else&lt;/keyword&gt;
-    &lt;keyword&gt;elif&lt;/keyword&gt;
-    &lt;keyword&gt;endif&lt;/keyword&gt;
+  &lt;keyword&gt;if(n?def)?&lt;/keyword&gt;
+  &lt;keyword&gt;else&lt;/keyword&gt;
+  &lt;keyword&gt;elif&lt;/keyword&gt;
+  &lt;keyword&gt;endif&lt;/keyword&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -480,9 +478,9 @@ these pseudo-comments as comments:
 
 <programlisting>
 &lt;context id="if0-comment" style-ref="comment"&gt;
-    &lt;start&gt;^#if 0\b&lt;/start&gt;
-    &lt;end&gt;^#(endif|else|elif)\b&lt;/end&gt;
-    &lt;include&gt;
+  &lt;start&gt;^#if 0\b&lt;/start&gt;
+  &lt;end&gt;^#(endif|else|elif)\b&lt;/end&gt;
+  &lt;include&gt;
 </programlisting>
 
 <para>
@@ -494,10 +492,10 @@ nested context, that will extend the parent on every nested
 </para>
 
 <programlisting>
-    &lt;context id="if-in-if0"&gt;
-        &lt;start&gt;^#if(n?def)?\b&lt;/start&gt;
-        &lt;end&gt;^#endif\b&lt;/end&gt;
-        &lt;include&gt;
+  &lt;context id="if-in-if0"&gt;
+    &lt;start&gt;^#if(n?def)?\b&lt;/start&gt;
+    &lt;end&gt;^#endif\b&lt;/end&gt;
+    &lt;include&gt;
 </programlisting>
 
 <para>
@@ -505,10 +503,10 @@ Nested contexts can be recursive:
 </para>
 
 <programlisting>
-            &lt;context ref="if-in-if0"/&gt;
-        &lt;/include&gt;
-    &lt;/context&gt;
+      &lt;context ref="if-in-if0"/&gt;
     &lt;/include&gt;
+  &lt;/context&gt;
+  &lt;/include&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -525,8 +523,8 @@ differently the included file:
 
 <programlisting>
 &lt;context id="include" style-ref="preprocessor"&gt;
-    &lt;match&gt;^#include (".*"|&amp;lt;.*&amp;gt;)&lt;/match&gt;
-    &lt;include&gt;
+  &lt;match&gt;^#include (".*"|&amp;lt;.*&amp;gt;)&lt;/match&gt;
+  &lt;include&gt;
 </programlisting>
 
 <para>
@@ -535,8 +533,8 @@ associating them with a context with the <code>sub-pattern</code> attribute:
 </para>
 
 <programlisting>
-        &lt;context id="included-file" sub-pattern="1"
-                 style-ref="included-file"/&gt;
+    &lt;context id="included-file" sub-pattern="1"
+             style-ref="included-file"/&gt;
 </programlisting>
 
 <para>
@@ -575,7 +573,7 @@ the <code>&lt;start&gt;</code> and <code>&lt;end&gt;</code> element.
 </para>
 
 <programlisting>
-    &lt;/include&gt;
+  &lt;/include&gt;
 &lt;/context&gt;
 </programlisting>
 
@@ -602,130 +600,128 @@ for this tutorial:
 <programlisting>
 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;language id="c" _name="C" version="2.0" _section="Sources"&gt;
-    &lt;metadata&gt;
-      &lt;property name="mimetypes"&gt;text/x-c;text/x-csrc&lt;/property&gt;
-      &lt;property name="globs"&gt;*.c&lt;/property&gt;
-    &lt;/metadata&gt;
-    &lt;styles&gt;
-      &lt;style id="comment" _name="Comment" map-to="def:comment"/&gt;
-      &lt;style id="string" _name="String" map-to="def:string"/&gt;
-      &lt;style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/&gt;
-      &lt;style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/&gt;
-      &lt;style id="included-file" _name="Included File" map-to="def:string"/&gt;
-      &lt;style id="char" _name="Character" map-to="def:character"/&gt;
-      &lt;style id="keyword" _name="Keyword" map-to="def:keyword"/&gt;
-      &lt;style id="type" _name="Data Type" map-to="def:type"/&gt;
-    &lt;/styles&gt;
-    &lt;definitions&gt;
-        &lt;context id="c"&gt;
-            &lt;include&gt;
-
-                &lt;context id="comment" style-ref="comment"&gt;
-                    &lt;start&gt;\/\/&lt;/start&gt;
-                    &lt;end&gt;$&lt;/end&gt;
-                &lt;/context&gt;
-
-                &lt;context id="string" end-at-line-end="true"
-                        style-ref="string"&gt;
-                    &lt;start&gt;"&lt;/start&gt;
-                    &lt;end&gt;"&lt;/end&gt;
-                    &lt;include&gt;
-                        &lt;context id="escape" style-ref="escaped-character"&gt;
-                            &lt;match&gt;\\.&lt;/match&gt;
-                        &lt;/context&gt;
-                    &lt;/include&gt;
-                &lt;/context&gt;
-
-                &lt;context id="comment-multiline"
-                            style-ref="comment"&gt;
-                    &lt;start&gt;\/\*&lt;/start&gt;
-                    &lt;end&gt;\*\/&lt;/end&gt;
-                    &lt;include&gt;
-                        &lt;context ref="def:in-comment"/&gt;
-                    &lt;/include&gt;
-                &lt;/context&gt;
-
-                &lt;context id="char" end-at-line-end="true" style-ref="string"&gt;
-                    &lt;start&gt;'&lt;/start&gt;
-                    &lt;end&gt;'&lt;/end&gt;
-                    &lt;include&gt;
-                        &lt;context ref="escape"/&gt;
-                    &lt;/include&gt;
-                &lt;/context&gt;
-
-                &lt;context ref="def:decimal"/&gt;
-                &lt;context ref="def:float"/&gt;
-
-                &lt;context id="keywords" style-ref="keyword"&gt;
-                    &lt;keyword&gt;if&lt;/keyword&gt;
-                    &lt;keyword&gt;else&lt;/keyword&gt;
-                    &lt;keyword&gt;for&lt;/keyword&gt;
-                    &lt;keyword&gt;while&lt;/keyword&gt;
-                    &lt;keyword&gt;return&lt;/keyword&gt;
-                    &lt;keyword&gt;break&lt;/keyword&gt;
-                    &lt;keyword&gt;switch&lt;/keyword&gt;
-                    &lt;keyword&gt;case&lt;/keyword&gt;
-                    &lt;keyword&gt;default&lt;/keyword&gt;
-                    &lt;keyword&gt;do&lt;/keyword&gt;
-                    &lt;keyword&gt;continue&lt;/keyword&gt;
-                    &lt;keyword&gt;goto&lt;/keyword&gt;
-                    &lt;keyword&gt;sizeof&lt;/keyword&gt;
-                &lt;/context&gt;
-
-                &lt;context id="types" style-ref="type"&gt;
-                    &lt;keyword&gt;char&lt;/keyword&gt;
-                    &lt;keyword&gt;const&lt;/keyword&gt;
-                    &lt;keyword&gt;double&lt;/keyword&gt;
-                    &lt;keyword&gt;enum&lt;/keyword&gt;
-                    &lt;keyword&gt;float&lt;/keyword&gt;
-                    &lt;keyword&gt;int&lt;/keyword&gt;
-                    &lt;keyword&gt;long&lt;/keyword&gt;
-                    &lt;keyword&gt;short&lt;/keyword&gt;
-                    &lt;keyword&gt;signed&lt;/keyword&gt;
-                    &lt;keyword&gt;static&lt;/keyword&gt;
-                    &lt;keyword&gt;struct&lt;/keyword&gt;
-                    &lt;keyword&gt;typedef&lt;/keyword&gt;
-                    &lt;keyword&gt;union&lt;/keyword&gt;
-                    &lt;keyword&gt;unsigned&lt;/keyword&gt;
-                    &lt;keyword&gt;void&lt;/keyword&gt;
-                &lt;/context&gt;
-
-                &lt;context id="if0-comment" style-ref="comment"&gt;
-                    &lt;start&gt;^#if 0\b&lt;/start&gt;
-                    &lt;end&gt;^#(endif|else|elif)\b&lt;/end&gt;
-                    &lt;include&gt;
-                        &lt;context id="if-in-if0"&gt;
-                            &lt;start&gt;^#if(n?def)?\b&lt;/start&gt;
-                            &lt;end&gt;^#endif\b&lt;/end&gt;
-                            &lt;include&gt;
-                                &lt;context ref="if-in-if0"/&gt;
-                            &lt;/include&gt;
-                        &lt;/context&gt;
-                    &lt;/include&gt;
-                &lt;/context&gt;
-
-                &lt;context id="preprocessor" style-ref="preprocessor"&gt;
-                    &lt;prefix&gt;^#&lt;/prefix&gt;
-                    &lt;keyword&gt;define&lt;/keyword&gt;
-                    &lt;keyword&gt;undef&lt;/keyword&gt;
-                    &lt;keyword&gt;if(n?def)?&lt;/keyword&gt;
-                    &lt;keyword&gt;else&lt;/keyword&gt;
-                    &lt;keyword&gt;elif&lt;/keyword&gt;
-                    &lt;keyword&gt;endif&lt;/keyword&gt;
-                &lt;/context&gt;
-
-                &lt;context id="include" style-ref="preprocessor"&gt;
-                    &lt;match&gt;^#include (".*"|&amp;lt;.*&amp;gt;)&lt;/match&gt;
-                    &lt;include&gt;
-                        &lt;context id="included-file" 
-                                sub-pattern="1"
-                                style-ref="included-file"/&gt;
-                    &lt;/include&gt;
-                &lt;/context&gt;
-
-            &lt;/include&gt;
+  &lt;metadata&gt;
+    &lt;property name="mimetypes"&gt;text/x-c;text/x-csrc&lt;/property&gt;
+    &lt;property name="globs"&gt;*.c&lt;/property&gt;
+  &lt;/metadata&gt;
+  &lt;styles&gt;
+    &lt;style id="comment" _name="Comment" map-to="def:comment"/&gt;
+    &lt;style id="string" _name="String" map-to="def:string"/&gt;
+    &lt;style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/&gt;
+    &lt;style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/&gt;
+    &lt;style id="included-file" _name="Included File" map-to="def:string"/&gt;
+    &lt;style id="char" _name="Character" map-to="def:character"/&gt;
+    &lt;style id="keyword" _name="Keyword" map-to="def:keyword"/&gt;
+    &lt;style id="type" _name="Data Type" map-to="def:type"/&gt;
+  &lt;/styles&gt;
+  &lt;definitions&gt;
+    &lt;context id="c"&gt;
+      &lt;include&gt;
+
+        &lt;context id="comment" style-ref="comment"&gt;
+          &lt;start&gt;\/\/&lt;/start&gt;
+          &lt;end&gt;$&lt;/end&gt;
+        &lt;/context&gt;
+
+        &lt;context id="string" end-at-line-end="true" style-ref="string"&gt;
+          &lt;start&gt;"&lt;/start&gt;
+          &lt;end&gt;"&lt;/end&gt;
+          &lt;include&gt;
+            &lt;context id="escape" style-ref="escaped-character"&gt;
+              &lt;match&gt;\\.&lt;/match&gt;
+            &lt;/context&gt;
+          &lt;/include&gt;
         &lt;/context&gt;
-    &lt;/definitions&gt;
+
+        &lt;context id="comment-multiline" style-ref="comment"&gt;
+          &lt;start&gt;\/\*&lt;/start&gt;
+          &lt;end&gt;\*\/&lt;/end&gt;
+          &lt;include&gt;
+            &lt;context ref="def:in-comment"/&gt;
+          &lt;/include&gt;
+        &lt;/context&gt;
+
+        &lt;context id="char" end-at-line-end="true" style-ref="string"&gt;
+          &lt;start&gt;'&lt;/start&gt;
+          &lt;end&gt;'&lt;/end&gt;
+          &lt;include&gt;
+            &lt;context ref="escape"/&gt;
+          &lt;/include&gt;
+        &lt;/context&gt;
+
+        &lt;context ref="def:decimal"/&gt;
+        &lt;context ref="def:float"/&gt;
+
+        &lt;context id="keywords" style-ref="keyword"&gt;
+          &lt;keyword&gt;if&lt;/keyword&gt;
+          &lt;keyword&gt;else&lt;/keyword&gt;
+          &lt;keyword&gt;for&lt;/keyword&gt;
+          &lt;keyword&gt;while&lt;/keyword&gt;
+          &lt;keyword&gt;return&lt;/keyword&gt;
+          &lt;keyword&gt;break&lt;/keyword&gt;
+          &lt;keyword&gt;switch&lt;/keyword&gt;
+          &lt;keyword&gt;case&lt;/keyword&gt;
+          &lt;keyword&gt;default&lt;/keyword&gt;
+          &lt;keyword&gt;do&lt;/keyword&gt;
+          &lt;keyword&gt;continue&lt;/keyword&gt;
+          &lt;keyword&gt;goto&lt;/keyword&gt;
+          &lt;keyword&gt;sizeof&lt;/keyword&gt;
+        &lt;/context&gt;
+
+        &lt;context id="types" style-ref="type"&gt;
+          &lt;keyword&gt;char&lt;/keyword&gt;
+          &lt;keyword&gt;const&lt;/keyword&gt;
+          &lt;keyword&gt;double&lt;/keyword&gt;
+          &lt;keyword&gt;enum&lt;/keyword&gt;
+          &lt;keyword&gt;float&lt;/keyword&gt;
+          &lt;keyword&gt;int&lt;/keyword&gt;
+          &lt;keyword&gt;long&lt;/keyword&gt;
+          &lt;keyword&gt;short&lt;/keyword&gt;
+          &lt;keyword&gt;signed&lt;/keyword&gt;
+          &lt;keyword&gt;static&lt;/keyword&gt;
+          &lt;keyword&gt;struct&lt;/keyword&gt;
+          &lt;keyword&gt;typedef&lt;/keyword&gt;
+          &lt;keyword&gt;union&lt;/keyword&gt;
+          &lt;keyword&gt;unsigned&lt;/keyword&gt;
+          &lt;keyword&gt;void&lt;/keyword&gt;
+        &lt;/context&gt;
+
+        &lt;context id="if0-comment" style-ref="comment"&gt;
+          &lt;start&gt;^#if 0\b&lt;/start&gt;
+          &lt;end&gt;^#(endif|else|elif)\b&lt;/end&gt;
+          &lt;include&gt;
+            &lt;context id="if-in-if0"&gt;
+              &lt;start&gt;^#if(n?def)?\b&lt;/start&gt;
+              &lt;end&gt;^#endif\b&lt;/end&gt;
+              &lt;include&gt;
+                &lt;context ref="if-in-if0"/&gt;
+              &lt;/include&gt;
+            &lt;/context&gt;
+          &lt;/include&gt;
+        &lt;/context&gt;
+
+        &lt;context id="preprocessor" style-ref="preprocessor"&gt;
+          &lt;prefix&gt;^#&lt;/prefix&gt;
+          &lt;keyword&gt;define&lt;/keyword&gt;
+          &lt;keyword&gt;undef&lt;/keyword&gt;
+          &lt;keyword&gt;if(n?def)?&lt;/keyword&gt;
+          &lt;keyword&gt;else&lt;/keyword&gt;
+          &lt;keyword&gt;elif&lt;/keyword&gt;
+          &lt;keyword&gt;endif&lt;/keyword&gt;
+        &lt;/context&gt;
+
+        &lt;context id="include" style-ref="preprocessor"&gt;
+          &lt;match&gt;^#include (".*"|&amp;lt;.*&amp;gt;)&lt;/match&gt;
+          &lt;include&gt;
+            &lt;context id="included-file"
+                     sub-pattern="1"
+                     style-ref="included-file"/&gt;
+          &lt;/include&gt;
+        &lt;/context&gt;
+
+      &lt;/include&gt;
+    &lt;/context&gt;
+  &lt;/definitions&gt;
 &lt;/language&gt;
 </programlisting>
 


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