[gtksourceview] Highlight erlang character literals



commit df66159d9eaf0b9759cd49130a93006d4e59f4b3
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Apr 15 18:03:13 2012 +0200

    Highlight erlang character literals
    
    Fixes bug #640129. Patch by james phsys co uk 

 data/language-specs/erlang.lang |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/erlang.lang b/data/language-specs/erlang.lang
index a851250..392d574 100644
--- a/data/language-specs/erlang.lang
+++ b/data/language-specs/erlang.lang
@@ -34,6 +34,7 @@
     <style id="operator" _name="Operator" map-to="def:operator"/>
     <style id="atom" _name="Atom" map-to="def:type"/>
     <style id="string" _name="String" map-to="def:string"/>
+    <style id="character" _name="Character" map-to="def:character"/>
     <style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
     <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
     <style id="base-n-integer" _name="Base-N Integer" map-to="def:base-n-integer"/>
@@ -97,6 +98,13 @@
       </include>
     </context>
 
+    <context id="character" style-ref="character" class="character" class-disabled="no-spell-check">
+      <match>\$(?:(\\.)|.)</match>
+      <include>
+        <context sub-pattern="1" style-ref="def:special-char"/>
+      </include>
+    </context>
+
     <context id="float" style-ref="floating-point">
       <match extended="true">
         (?&lt;![\w\.])
@@ -236,6 +244,7 @@
         <context ref="operators"/>
         <context ref="atom"/>
         <context ref="string"/>
+        <context ref="character"/>
         <context ref="float"/>
         <context ref="base-n-number"/>
         <context ref="decimal-number"/>



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