etc: attempts at fixing editor highlighting for new attribute syntax

This commit is contained in:
Corey Richardson 2014-03-30 08:34:32 -04:00
parent 2eccb1d0c2
commit b6d5dafea5
3 changed files with 3 additions and 2 deletions

View File

@ -122,7 +122,7 @@
;; but the "else" or "{" should align with the beginning ;; but the "else" or "{" should align with the beginning
;; of the expression it's in.) ;; of the expression it's in.)
(looking-at "\\<else\\>\\|{") (looking-at "\\<else\\>\\|{")
(save-excursion (save-excursion
(rust-rewind-irrelevant) (rust-rewind-irrelevant)
;; Point is now at the end of the previous ine ;; Point is now at the end of the previous ine

View File

@ -282,7 +282,7 @@
</context> </context>
<context id="attribute" style-ref="attribute" class="attribute"> <context id="attribute" style-ref="attribute" class="attribute">
<start extended="true">\#\[</start> <start extended="true">\#!?\[</start>
<end>\]</end> <end>\]</end>
<include> <include>
<context ref="def:in-comment"/> <context ref="def:in-comment"/>

View File

@ -202,6 +202,7 @@
<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" 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"/> <RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/> <Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
<Detect2Chars char="#" char1="!" char2="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
<RegExpr String="&rustIdent;::" attribute="Scope"/> <RegExpr String="&rustIdent;::" attribute="Scope"/>
<RegExpr String="&rustIdent;!" attribute="Macro"/> <RegExpr String="&rustIdent;!" attribute="Macro"/>
<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/> <RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>