[gtksourceview] lua.lang: added goto and label support



commit c5c9d8cccb34adee8bd2f126737cf3a3cb33a0cd
Author: Kate Adams <self kateadams eu>
Date:   Mon Oct 20 16:58:39 2014 +0100

    lua.lang: added goto and label support
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738879

 data/language-specs/lua.lang |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/lua.lang b/data/language-specs/lua.lang
index 2c6da88..e0de3a1 100644
--- a/data/language-specs/lua.lang
+++ b/data/language-specs/lua.lang
@@ -36,6 +36,7 @@
     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
     <style id="escape" _name="Escaped Character" map-to="def:special-char"/>
     <style id="reserved" _name="Reserved Identifier" map-to="def:keyword"/>
+    <style id="label" _name="Label" map-to="def:keyword"/>
     <style id="function" _name="Function" map-to="def:function"/>
     <style id="nil-value" _name="Nil Constant" map-to="def:special-constant"/>
     <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
@@ -46,6 +47,10 @@
       <match>\\(\d\d?\d?|.)</match>
     </context>
 
+    <context id="label" style-ref="label">
+      <match>\:\:[A-Za-z_][A-Za-z0-9_]*\:\:</match>
+    </context>
+
     <context id="string" style-ref="string" end-at-line-end="true" class="string" 
class-disabled="no-spell-check">
       <start>["']</start>
       <end>\%{0 start}</end>
@@ -84,6 +89,7 @@
       <keyword>end</keyword>
       <keyword>for</keyword>
       <keyword>function</keyword>
+      <keyword>goto</keyword>
       <keyword>if</keyword>
       <keyword>in</keyword>
       <keyword>local</keyword>
@@ -142,6 +148,7 @@
       <include>
         <context ref="def:shebang"/>
         <context ref="multi-line-string"/>
+        <context ref="label"/>
         <context ref="string"/>
         <context ref="block-comment"/>
         <context ref="line-comment"/>


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