33" Maintainer: Patrick Walton <pcwalton@mozilla.com>
44" Maintainer: Ben Blum <bblum@cs.cmu.edu>
55" Maintainer: Chris Morgan <me@chrismorgan.info>
6- " Last Change: 2014 Jan 4
6+ " Last Change: 2014 Feb 14
77
88if version < 600
99 syntax clear
@@ -18,7 +18,8 @@ syn keyword rustOperator as
1818
1919syn match rustAssert " \< assert\(\w\) *!" contained
2020syn match rustFail " \< fail\(\w\) *!" contained
21- syn keyword rustKeyword break continue do extern
21+ syn keyword rustKeyword break continue do
22+ syn keyword rustKeyword extern nextgroup =rustExternCrate skipwhite
2223syn keyword rustKeyword for in if impl let
2324syn keyword rustKeyword loop once priv pub
2425syn keyword rustKeyword return
@@ -31,6 +32,10 @@ syn keyword rustKeyword proc
3132syn keyword rustStorage mut ref static
3233syn keyword rustObsoleteStorage const
3334
35+ syn keyword rustInvalidBareKeyword crate
36+
37+ syn keyword rustExternCrate crate contained nextgroup =rustIdentifier skipwhite
38+
3439syn match rustIdentifier contains =rustIdentifierPrime " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
3540syn match rustFuncName " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
3641
@@ -81,7 +86,7 @@ syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
8186
8287syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
8388syn keyword rustTrait Bitwise Bounded Integer Fractional Real RealExt
84- syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
89+ syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul CheckedDiv
8590syn keyword rustTrait Orderable Signed Unsigned Round
8691syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
8792syn keyword rustTrait GenericPath Path PosixPath WindowsPath
@@ -245,6 +250,8 @@ hi def link rustDeriving PreProc
245250hi def link rustStorage StorageClass
246251hi def link rustObsoleteStorage Error
247252hi def link rustLifetime Special
253+ hi def link rustInvalidBareKeyword Error
254+ hi def link rustExternCrate rustKeyword
248255
249256" Other Suggestions:
250257" hi rustAttribute ctermfg=cyan
0 commit comments