about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Sproul <micsproul@gmail.com>2014-08-04 11:28:37 +1000
committerMichael Sproul <micsproul@gmail.com>2014-08-04 11:28:37 +1000
commit806e4f0b14d45cdb2c5d585d1a201c490b9db96a (patch)
tree5ff6760cf6eac40a5e592e7fa4e796b32beb80c0
parentd34e011b8e4b7df4433aaf32ea42e36a577a6386 (diff)
downloadrust-806e4f0b14d45cdb2c5d585d1a201c490b9db96a.tar.gz
rust-806e4f0b14d45cdb2c5d585d1a201c490b9db96a.zip
Gedit/GTKSourceView: Add macro syntax highlighting.
-rw-r--r--src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang b/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang
index a934c426857..befac48a743 100644
--- a/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang
+++ b/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang
@@ -22,6 +22,7 @@
     <style id="number" _name="Number" map-to="def:number"/>
     <style id="scope" _name="Scope" map-to="def:preprocessor"/>
     <style id="attribute" _name="Attribute" map-to="def:preprocessor"/>
+    <style id="macro" _name="Macro" map-to="def:preprocessor"/>
   </styles>
 
   <definitions>
@@ -251,6 +252,12 @@
       </match>
     </context>
 
+    <context id="macro" style-ref="macro">
+      <match extended="true">
+        \%{ident}!
+      </match>
+    </context>
+
     <context id="lifetime" style-ref="keyword">
       <match extended="true">
         '\%{ident}
@@ -308,6 +315,7 @@
         <context ref="types"/>
         <context ref="ctypes"/>
         <context ref="self"/>
+        <context ref="macro"/>
         <context ref="constants"/>
         <context ref="cconstants"/>
         <context ref="line-comment"/>