]> git.lizzy.rs Git - rust.git/commitdiff
kate: introduce &rustIdent; entity
authorAndrew Paseltiner <apaseltiner@gmail.com>
Wed, 27 Feb 2013 03:12:26 +0000 (22:12 -0500)
committerAndrew Paseltiner <apaseltiner@gmail.com>
Sun, 3 Mar 2013 13:40:37 +0000 (08:40 -0500)
src/etc/kate/rust.xml

index bd7446d34e36060aa6f41690679998fee36e3a6e..5ecab0d49c00761b53b1ab1f67e673462f232724 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE language SYSTEM "language.dtd">
+<!DOCTYPE language SYSTEM "language.dtd"
+[
+       <!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
+]>
 <language name="Rust" version="0.4.0" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
 <highlighting>
        <list name="fn">
                        <RegExpr String="0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
                        <RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
                        <RegExpr String="[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
-                       <RegExpr String="[a-zA-Z_][a-zA-Z0-9_]*::" attribute="Scope"/>
-                       <RegExpr String="\w+!" attribute="Macro"/>
+                       <RegExpr String="&rustIdent;::" attribute="Scope"/>
+                       <RegExpr String="&rustIdent;!" attribute="Macro"/>
                        <DetectChar char="{" attribute="Symbol" context="#stay" beginRegion="Brace" />
                        <DetectChar char="}" attribute="Symbol" context="#stay" endRegion="Brace" />
                        <DetectChar char="&quot;" attribute="String" context="String"/>