|
14 | 14 |
|
15 | 15 | " Syntax definitions {{{1
|
16 | 16 | " Basic keywords {{{2
|
17 |
| -syn match rustNoise "[,\.\[\]()]" display nextgroup=rustNoise,rustKeyword,rustStorage,@rustLiterals,@rustIdentifiers skipempty skipwhite |
| 17 | +syn match rustNoise "[,\.\[\]()]" display nextgroup=rustRange,rustNoise,rustKeyword,rustStorage,@rustLiterals,@rustIdentifiers skipempty skipwhite |
18 | 18 | syn match rustNoise ";" display
|
19 | 19 | syn match rustBounds ":" display nextgroup=rustKeyword,rustStorage,@rustIdentifiers skipempty skipwhite
|
20 | 20 | syn keyword rustConditional match if else nextgroup=rustConditional,@rustIdentifiers skipempty skipwhite
|
@@ -132,6 +132,7 @@ syn region rustFoldModPath matchgroup=rustNoise start="\(::\s*\n*\)\@<={" end
|
132 | 132 | "syn match rustCapsIdent display "[A-Z]\w\(\w\)*"
|
133 | 133 |
|
134 | 134 | syn match rustOperator "\%(+\|-\|/\|*\|=\|\^\|&\||\|!\| [<>]\|%\)=\?" display nextgroup=@rustLiterals,@rustIdentifiers skipempty skipwhite
|
| 135 | +syn match rustRange "\.\." display nextgroup=rustNoise,@rustLiterals,@rustIdentifiers skipempty skipwhite |
135 | 136 | syn region rustGenericRegion matchgroup=rustNoise start="\(\s\+\|=\)\@<!<" end="\(=\|-\)\@<!>" contains=rustNoise,rustBounds,rustGenericRegion,@rustIdentifiers
|
136 | 137 | " This one isn't *quite* right, as we could have binary-& with a reference
|
137 | 138 | syn match rustSigil /&\s\+[&~@*][^)= \t\r\n]/he=e-1,me=e-1 nextgroup=rustStorage,@rustIdentifiers skipempty skipwhite
|
@@ -325,6 +326,7 @@ hi def link rustSelf Constant
|
325 | 326 | hi def link rustFloat Float
|
326 | 327 | hi def link rustArrowCharacter rustOperator
|
327 | 328 | hi def link rustOperator Operator
|
| 329 | +hi def link rustRange rustOperator |
328 | 330 | hi def link rustBounds rustOperator
|
329 | 331 | hi def link rustKeyword Keyword
|
330 | 332 | hi def link rustDynKeyword rustKeyword
|
|
0 commit comments