kate: detect and highlight attributes

This commit is contained in:
Andrew Paseltiner 2013-03-03 08:56:39 -05:00
parent 4548eb1a29
commit 6002d10ce3

View File

@ -203,6 +203,7 @@
<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_]*&rustIntSuf;" attribute="Number" context="#stay"/>
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute"/>
<RegExpr String="&rustIdent;::" attribute="Scope"/>
<RegExpr String="&rustIdent;!" attribute="Macro"/>
<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>
@ -212,6 +213,10 @@
<DetectChar char="&apos;" attribute="Character" context="Character"/>
<DetectIdentifier/>
</context>
<context attribute="Attribute" lineEndContext="#stay" name="Attribute">
<IncludeRules context="Normal"/>
<DetectChar char="]" attribute="Attribute" context="#pop"/>
</context>
<context attribute="Definition" lineEndContext="#stay" name="Function">
<DetectSpaces/>
<DetectChar char="(" attribute="Normal Text" context="#pop"/>
@ -254,6 +259,7 @@
<itemData name="String Char" defStyleNum="dsChar" color="#FF0000"/>
<itemData name="Character" defStyleNum="dsChar" color="#FF0000"/>
<itemData name="Macro" defStyleNum="dsOthers"/>
<itemData name="Attribute" defStyleNum="dsOthers"/>
<itemData name="Lifetime" defStyleNum="dsOthers" bold="1"/>
</itemDatas>
</highlighting>