about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2013-03-03 08:49:01 -0500
committerAndrew Paseltiner <apaseltiner@gmail.com>2013-03-03 08:49:16 -0500
commit4548eb1a2921ec8302b11bf5f3195c93cf66c2da (patch)
treed1b8ecff9186922252a06ee969e79e37b4cb8bb5
parentc771a93c50bfa73acf285eee05407d0618c85175 (diff)
downloadrust-4548eb1a2921ec8302b11bf5f3195c93cf66c2da.tar.gz
rust-4548eb1a2921ec8302b11bf5f3195c93cf66c2da.zip
kate: consolidate integer suffixes with &rustIntSuf; entity
-rw-r--r--src/etc/kate/rust.xml7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/etc/kate/rust.xml b/src/etc/kate/rust.xml
index 9a99c32943e..7bb4a769f94 100644
--- a/src/etc/kate/rust.xml
+++ b/src/etc/kate/rust.xml
@@ -5,6 +5,7 @@
 	predefined char classes, so making rustIdent consistent with actual
 	Rust identifiers will be a bit difficult -->
 	<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
+	<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
 ]>
 <language name="Rust" version="0.6" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
 <highlighting>
@@ -198,10 +199,10 @@
 			<keyword String="cconstants" attribute="CConstant" context="#stay"/>
 			<Detect2Chars char="/" char1="/" attribute="Comment" context="Commentar 1"/>
 			<Detect2Chars char="/" char1="*" attribute="Comment" context="Commentar 2" beginRegion="Comment"/>
-			<RegExpr String="0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
-			<RegExpr String="0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?" attribute="Number" context="#stay"/>
+			<RegExpr String="0x[0-9a-fA-F_]+&rustIntSuf;" attribute="Number" context="#stay"/>
+			<RegExpr String="0b[0-1_]+&rustIntSuf;" 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="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
 			<RegExpr String="&rustIdent;::" attribute="Scope"/>
 			<RegExpr String="&rustIdent;!" attribute="Macro"/>
 			<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>