2012-08-20 15:51:02 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2013-02-26 21:12:26 -06:00
|
|
|
<!DOCTYPE language SYSTEM "language.dtd"
|
|
|
|
[
|
2013-03-03 07:45:07 -06:00
|
|
|
<!-- TODO: Kate's regex engine has very limited support for
|
|
|
|
predefined char classes, so making rustIdent consistent with actual
|
|
|
|
Rust identifiers will be a bit difficult -->
|
2013-02-26 21:12:26 -06:00
|
|
|
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
|
2013-03-03 07:49:01 -06:00
|
|
|
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
|
2013-02-26 21:12:26 -06:00
|
|
|
]>
|
2013-04-04 23:46:37 -05:00
|
|
|
<language name="Rust" version="0.7-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
|
2012-08-20 15:51:02 -05:00
|
|
|
<highlighting>
|
|
|
|
<list name="fn">
|
|
|
|
<item> fn </item>
|
|
|
|
</list>
|
|
|
|
<list name="type">
|
|
|
|
<item> type </item>
|
|
|
|
</list>
|
|
|
|
<list name="keywords">
|
|
|
|
<item> as </item>
|
|
|
|
<item> break </item>
|
|
|
|
<item> copy </item>
|
|
|
|
<item> do </item>
|
|
|
|
<item> drop </item>
|
|
|
|
<item> else </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> enum </item>
|
2012-08-20 15:51:02 -05:00
|
|
|
<item> extern </item>
|
|
|
|
<item> for </item>
|
|
|
|
<item> if </item>
|
|
|
|
<item> impl </item>
|
|
|
|
<item> let </item>
|
|
|
|
<item> loop </item>
|
|
|
|
<item> match </item>
|
|
|
|
<item> mod </item>
|
|
|
|
<item> mut </item>
|
|
|
|
<item> priv </item>
|
|
|
|
<item> pub </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> ref </item>
|
2012-08-20 15:51:02 -05:00
|
|
|
<item> return </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> static </item>
|
|
|
|
<item> struct </item>
|
2013-03-25 05:43:29 -05:00
|
|
|
<item> super </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> trait </item>
|
2012-08-20 15:51:02 -05:00
|
|
|
<item> unsafe </item>
|
|
|
|
<item> use </item>
|
|
|
|
<item> while </item>
|
|
|
|
</list>
|
2013-03-02 08:09:09 -06:00
|
|
|
<list name="traits">
|
|
|
|
<item> Const </item>
|
|
|
|
<item> Copy </item>
|
|
|
|
<item> Send </item>
|
|
|
|
<item> Owned </item>
|
|
|
|
<item> Eq </item>
|
|
|
|
<item> Ord </item>
|
|
|
|
<item> Num </item>
|
|
|
|
<item> Ptr </item>
|
|
|
|
<item> Drop </item>
|
|
|
|
<item> Add </item>
|
|
|
|
<item> Sub </item>
|
|
|
|
<item> Mul </item>
|
2013-04-21 10:58:53 -05:00
|
|
|
<item> Quot </item>
|
|
|
|
<item> Rem </item>
|
2013-03-02 08:09:09 -06:00
|
|
|
<item> Neg </item>
|
|
|
|
<item> BitAnd </item>
|
|
|
|
<item> BitOr </item>
|
|
|
|
<item> BitXor </item>
|
|
|
|
<item> Shl </item>
|
|
|
|
<item> Shr </item>
|
|
|
|
<item> Index </item>
|
2013-03-07 05:53:46 -06:00
|
|
|
<item> Not </item>
|
2013-03-02 08:09:09 -06:00
|
|
|
</list>
|
2012-08-20 15:51:02 -05:00
|
|
|
<list name="types">
|
|
|
|
<item> bool </item>
|
|
|
|
<item> int </item>
|
|
|
|
<item> uint </item>
|
|
|
|
<item> i8 </item>
|
|
|
|
<item> i16 </item>
|
|
|
|
<item> i32 </item>
|
|
|
|
<item> i64 </item>
|
|
|
|
<item> u8 </item>
|
|
|
|
<item> u16 </item>
|
|
|
|
<item> u32 </item>
|
|
|
|
<item> u64 </item>
|
|
|
|
<item> f32 </item>
|
|
|
|
<item> f64 </item>
|
|
|
|
<item> float </item>
|
|
|
|
<item> char </item>
|
|
|
|
<item> str </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> Either </item>
|
|
|
|
<item> Option </item>
|
|
|
|
<item> Result </item>
|
2013-03-02 08:10:12 -06:00
|
|
|
<item> Self </item>
|
2012-08-20 15:51:02 -05:00
|
|
|
</list>
|
|
|
|
<list name="ctypes">
|
|
|
|
<item> c_float </item>
|
|
|
|
<item> c_double </item>
|
|
|
|
<item> c_void </item>
|
|
|
|
<item> FILE </item>
|
|
|
|
<item> fpos_t </item>
|
|
|
|
<item> DIR </item>
|
|
|
|
<item> dirent </item>
|
|
|
|
<item> c_char </item>
|
|
|
|
<item> c_schar </item>
|
|
|
|
<item> c_uchar </item>
|
|
|
|
<item> c_short </item>
|
|
|
|
<item> c_ushort </item>
|
|
|
|
<item> c_int </item>
|
|
|
|
<item> c_uint </item>
|
|
|
|
<item> c_long </item>
|
|
|
|
<item> c_ulong </item>
|
|
|
|
<item> size_t </item>
|
|
|
|
<item> ptrdiff_t </item>
|
|
|
|
<item> clock_t </item>
|
|
|
|
<item> time_t </item>
|
|
|
|
<item> c_longlong </item>
|
|
|
|
<item> c_ulonglong </item>
|
|
|
|
<item> intptr_t </item>
|
|
|
|
<item> uintptr_t </item>
|
|
|
|
<item> off_t </item>
|
|
|
|
<item> dev_t </item>
|
|
|
|
<item> ino_t </item>
|
|
|
|
<item> pid_t </item>
|
|
|
|
<item> mode_t </item>
|
|
|
|
<item> ssize_t </item>
|
|
|
|
</list>
|
|
|
|
<list name="self">
|
|
|
|
<item> self </item>
|
|
|
|
</list>
|
|
|
|
<list name="constants">
|
|
|
|
<item> true </item>
|
|
|
|
<item> false </item>
|
2012-10-05 19:18:19 -05:00
|
|
|
<item> Some </item>
|
|
|
|
<item> None </item>
|
|
|
|
<item> Left </item>
|
|
|
|
<item> Right </item>
|
|
|
|
<item> Ok </item>
|
|
|
|
<item> Err </item>
|
|
|
|
<item> Success </item>
|
|
|
|
<item> Failure </item>
|
|
|
|
<item> Cons </item>
|
|
|
|
<item> Nil </item>
|
2012-08-20 15:51:02 -05:00
|
|
|
</list>
|
|
|
|
<list name="cconstants">
|
|
|
|
<item> EXIT_FAILURE </item>
|
|
|
|
<item> EXIT_SUCCESS </item>
|
|
|
|
<item> RAND_MAX </item>
|
|
|
|
<item> EOF </item>
|
|
|
|
<item> SEEK_SET </item>
|
|
|
|
<item> SEEK_CUR </item>
|
|
|
|
<item> SEEK_END </item>
|
|
|
|
<item> _IOFBF </item>
|
|
|
|
<item> _IONBF </item>
|
|
|
|
<item> _IOLBF </item>
|
|
|
|
<item> BUFSIZ </item>
|
|
|
|
<item> FOPEN_MAX </item>
|
|
|
|
<item> FILENAME_MAX </item>
|
|
|
|
<item> L_tmpnam </item>
|
|
|
|
<item> TMP_MAX </item>
|
|
|
|
<item> O_RDONLY </item>
|
|
|
|
<item> O_WRONLY </item>
|
|
|
|
<item> O_RDWR </item>
|
|
|
|
<item> O_APPEND </item>
|
|
|
|
<item> O_CREAT </item>
|
|
|
|
<item> O_EXCL </item>
|
|
|
|
<item> O_TRUNC </item>
|
|
|
|
<item> S_IFIFO </item>
|
|
|
|
<item> S_IFCHR </item>
|
|
|
|
<item> S_IFBLK </item>
|
|
|
|
<item> S_IFDIR </item>
|
|
|
|
<item> S_IFREG </item>
|
|
|
|
<item> S_IFMT </item>
|
|
|
|
<item> S_IEXEC </item>
|
|
|
|
<item> S_IWRITE </item>
|
|
|
|
<item> S_IREAD </item>
|
|
|
|
<item> S_IRWXU </item>
|
|
|
|
<item> S_IXUSR </item>
|
|
|
|
<item> S_IWUSR </item>
|
|
|
|
<item> S_IRUSR </item>
|
|
|
|
<item> F_OK </item>
|
|
|
|
<item> R_OK </item>
|
|
|
|
<item> W_OK </item>
|
|
|
|
<item> X_OK </item>
|
|
|
|
<item> STDIN_FILENO </item>
|
|
|
|
<item> STDOUT_FILENO </item>
|
|
|
|
<item> STDERR_FILENO </item>
|
|
|
|
</list>
|
|
|
|
<contexts>
|
|
|
|
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
|
|
|
<DetectSpaces/>
|
|
|
|
<keyword String="fn" attribute="Keyword" context="Function"/>
|
|
|
|
<keyword String="type" attribute="Keyword" context="Type"/>
|
|
|
|
<keyword String="keywords" attribute="Keyword" context="#stay"/>
|
|
|
|
<keyword String="types" attribute="Type" context="#stay"/>
|
2013-03-02 08:09:09 -06:00
|
|
|
<keyword String="traits" attribute="Trait" context="#stay"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
<keyword String="ctypes" attribute="CType" context="#stay"/>
|
|
|
|
<keyword String="self" attribute="Self" context="#stay"/>
|
|
|
|
<keyword String="constants" attribute="Constant" context="#stay"/>
|
|
|
|
<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"/>
|
2013-03-03 07:49:01 -06:00
|
|
|
<RegExpr String="0x[0-9a-fA-F_]+&rustIntSuf;" attribute="Number" context="#stay"/>
|
|
|
|
<RegExpr String="0b[0-1_]+&rustIntSuf;" attribute="Number" context="#stay"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
|
2013-03-03 07:49:01 -06:00
|
|
|
<RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
|
2013-03-03 08:14:53 -06:00
|
|
|
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
|
2013-02-26 21:12:26 -06:00
|
|
|
<RegExpr String="&rustIdent;::" attribute="Scope"/>
|
|
|
|
<RegExpr String="&rustIdent;!" attribute="Macro"/>
|
2013-02-26 21:17:58 -06:00
|
|
|
<RegExpr String="'&rustIdent;(?!')" attribute="Lifetime"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
<DetectChar char="{" attribute="Symbol" context="#stay" beginRegion="Brace" />
|
|
|
|
<DetectChar char="}" attribute="Symbol" context="#stay" endRegion="Brace" />
|
|
|
|
<DetectChar char=""" attribute="String" context="String"/>
|
2012-08-21 09:27:17 -05:00
|
|
|
<DetectChar char="'" attribute="Character" context="Character"/>
|
2013-03-03 08:14:53 -06:00
|
|
|
<DetectChar char="[" attribute="Symbol" context="#stay" beginRegion="Bracket" />
|
|
|
|
<DetectChar char="]" attribute="Symbol" context="#stay" endRegion="Bracket" />
|
2012-08-20 15:51:02 -05:00
|
|
|
<DetectIdentifier/>
|
|
|
|
</context>
|
2013-03-03 07:56:39 -06:00
|
|
|
<context attribute="Attribute" lineEndContext="#stay" name="Attribute">
|
2013-03-03 08:14:53 -06:00
|
|
|
<DetectChar char="]" attribute="Attribute" context="#pop" endRegion="Attribute"/>
|
2013-03-03 07:56:39 -06:00
|
|
|
<IncludeRules context="Normal"/>
|
|
|
|
</context>
|
2012-08-20 15:51:02 -05:00
|
|
|
<context attribute="Definition" lineEndContext="#stay" name="Function">
|
|
|
|
<DetectSpaces/>
|
|
|
|
<DetectChar char="(" attribute="Normal Text" context="#pop"/>
|
|
|
|
<DetectChar char="<" attribute="Normal Text" context="#pop"/>
|
|
|
|
</context>
|
|
|
|
<context attribute="Definition" lineEndContext="#stay" name="Type">
|
|
|
|
<DetectSpaces/>
|
|
|
|
<DetectChar char="=" attribute="Normal Text" context="#pop"/>
|
|
|
|
<DetectChar char="<" attribute="Normal Text" context="#pop"/>
|
|
|
|
</context>
|
2012-08-21 09:27:17 -05:00
|
|
|
<context attribute="String" lineEndContext="#stay" name="String">
|
2012-08-20 15:51:02 -05:00
|
|
|
<LineContinue attribute="String" context="#stay"/>
|
2013-03-03 08:08:28 -06:00
|
|
|
<DetectChar char="\" attribute="CharEscape" context="CharEscape"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
<DetectChar attribute="String" context="#pop" char="""/>
|
|
|
|
</context>
|
2012-08-21 09:27:17 -05:00
|
|
|
<context attribute="Character" lineEndContext="#pop" name="Character">
|
2013-03-03 08:08:28 -06:00
|
|
|
<DetectChar char="\" attribute="CharEscape" context="CharEscape"/>
|
2012-08-21 09:27:17 -05:00
|
|
|
<DetectChar attribute="Character" context="#pop" char="'"/>
|
|
|
|
</context>
|
2013-03-03 08:08:28 -06:00
|
|
|
<context attribute="CharEscape" lineEndContext="#pop" name="CharEscape">
|
|
|
|
<AnyChar String="nrt\'"" attribute="CharEscape" context="#pop"/>
|
|
|
|
<RegExpr String="x[0-9a-fA-F]{2}" attribute="CharEscape" context="#pop"/>
|
|
|
|
<RegExpr String="u[0-9a-fA-F]{4}" attribute="CharEscape" context="#pop"/>
|
|
|
|
<RegExpr String="U[0-9a-fA-F]{8}" attribute="CharEscape" context="#pop"/>
|
|
|
|
<RegExpr String="." attribute="Error" context="#pop"/>
|
|
|
|
</context>
|
2012-08-20 15:51:02 -05:00
|
|
|
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1"/>
|
|
|
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
|
|
|
<DetectSpaces/>
|
|
|
|
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
|
|
|
|
</context>
|
|
|
|
</contexts>
|
|
|
|
<itemDatas>
|
|
|
|
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
|
|
|
<itemData name="Keyword" defStyleNum="dsKeyword" color="#770088" bold="1"/>
|
|
|
|
<itemData name="Self" defStyleNum="dsKeyword" color="#FF0000" bold="1"/>
|
|
|
|
<itemData name="Type" defStyleNum="dsKeyword" color="#4e9a06" bold="1"/>
|
2013-03-02 08:09:09 -06:00
|
|
|
<itemData name="Trait" defStyleNum="dsKeyword" color="#4e9a06" bold="1"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
<itemData name="CType" defStyleNum="dsNormal" color="#4e9a06"/>
|
|
|
|
<itemData name="Constant" defStyleNum="dsKeyword" color="#116644"/>
|
|
|
|
<itemData name="CConstant" defStyleNum="dsNormal" color="#116644"/>
|
|
|
|
<itemData name="Definition" defStyleNum="dsNormal" color="#0000FF"/>
|
|
|
|
<itemData name="Comment" defStyleNum="dsComment" color="#AA5500"/>
|
|
|
|
<itemData name="Scope" defStyleNum="dsNormal" color="#0055AA"/>
|
|
|
|
<itemData name="Number" defStyleNum="dsDecVal" color="#116644"/>
|
|
|
|
<itemData name="String" defStyleNum="dsString" color="#FF0000"/>
|
2013-03-03 08:08:28 -06:00
|
|
|
<itemData name="CharEscape" defStyleNum="dsChar" color="#FF0000" bold="1"/>
|
2012-08-21 09:27:17 -05:00
|
|
|
<itemData name="Character" defStyleNum="dsChar" color="#FF0000"/>
|
2013-02-26 19:31:28 -06:00
|
|
|
<itemData name="Macro" defStyleNum="dsOthers"/>
|
2013-03-03 07:56:39 -06:00
|
|
|
<itemData name="Attribute" defStyleNum="dsOthers"/>
|
2013-02-26 21:17:58 -06:00
|
|
|
<itemData name="Lifetime" defStyleNum="dsOthers" bold="1"/>
|
2013-03-03 08:08:28 -06:00
|
|
|
<itemData name="Error" defStyleNum="dsError"/>
|
2012-08-20 15:51:02 -05:00
|
|
|
</itemDatas>
|
|
|
|
</highlighting>
|
|
|
|
<general>
|
|
|
|
<comments>
|
|
|
|
<comment name="singleLine" start="//" />
|
|
|
|
<comment name="multiLine" start="/*" end="*/" region="Comment"/>
|
|
|
|
</comments>
|
|
|
|
<keywords casesensitive="1" />
|
|
|
|
</general>
|
|
|
|
</language>
|