Skip to content

Commit 9ee89c0

Browse files
committed
---
yaml --- r: 124795 b: refs/heads/master c: df68c6f h: refs/heads/master i: 124793: 26f9ba6 124791: ef65e9b v: v3
1 parent 9fa03e5 commit 9ee89c0

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 414862db3cb7ff75f8d2373466e547a0464d683d
2+
refs/heads/master: df68c6f3c35354662b39128d56d5dcc6deadf591
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
55
refs/heads/try: e398fc9998259d5ff86bbf5028c258aaec548c47

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
55
" Maintainer: Chris Morgan <[email protected]>
6-
" Last Change: July 06, 2014
6+
" Last Change: July 18, 2014
77

88
if version < 600
99
syntax clear
@@ -38,7 +38,7 @@ syn keyword rustKeyword for in if impl let
3838
syn keyword rustKeyword loop once proc pub
3939
syn keyword rustKeyword return super
4040
syn keyword rustKeyword unsafe virtual while
41-
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
41+
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
4242
" FIXME: Scoped impl's name is also fallen in this category
4343
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
4444
syn keyword rustStorage mut ref static const
@@ -60,6 +60,10 @@ syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlace
6060
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
6161
" {} are handled by rustFoldBraces
6262

63+
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
64+
syn match rustMacroRepeatCount ".\?[*+]" contained
65+
syn match rustMacroVariable "$\w\+"
66+
6367
" Reserved (but not yet used) keywords {{{2
6468
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
6569

@@ -138,8 +142,9 @@ syn keyword rustBoolean true false
138142
" If foo::bar changes to foo.bar, change this ("::" to "\.").
139143
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
140144
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
141-
syn match rustModPath "\w\(\w\)*" contained " only for 'use path;'
145+
syn match rustModPathInUse "\w\(\w\)*" contained " only for 'use path;'
142146
syn match rustModPathSep "::"
147+
" rustModPathInUse is split out from rustModPath so that :syn-include can get the group list right.
143148

144149
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
145150
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
@@ -233,6 +238,9 @@ hi def link rustBinNumber rustNumber
233238
hi def link rustIdentifierPrime rustIdentifier
234239
hi def link rustTrait rustType
235240

241+
hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
242+
hi def link rustMacroRepeatDelimiters Macro
243+
hi def link rustMacroVariable Define
236244
hi def link rustSigil StorageClass
237245
hi def link rustEscape Special
238246
hi def link rustEscapeUnicode rustEscape
@@ -255,6 +263,7 @@ hi def link rustReservedKeyword Error
255263
hi def link rustConditional Conditional
256264
hi def link rustIdentifier Identifier
257265
hi def link rustCapsIdent rustIdentifier
266+
hi def link rustModPathInUse rustModPath
258267
hi def link rustModPath Include
259268
hi def link rustModPathSep Delimiter
260269
hi def link rustFunction Function

0 commit comments

Comments
 (0)