Skip to content

Commit 8b4df13

Browse files
authored
Merge pull request #117 from Reflejo/rethrow-fix
Add rethrow as a modifier
2 parents 03f65c7 + 5a94884 commit 8b4df13

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

syntax/swift.vim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ syntax keyword swiftKeywords
150150
\ public
151151
\ repeat
152152
\ required
153-
\ rethrows
154153
\ return
155154
\ self
156155
\ set
@@ -159,7 +158,6 @@ syntax keyword swiftKeywords
159158
\ super
160159
\ switch
161160
\ throw
162-
\ throws
163161
\ try
164162
\ typealias
165163
\ unowned
@@ -169,6 +167,10 @@ syntax keyword swiftKeywords
169167
\ while
170168
\ willSet
171169

170+
syntax keyword swiftDefinitionModifier
171+
\ rethrows
172+
\ throws
173+
172174
syntax match swiftMultiwordKeywords "indirect case"
173175
syntax match swiftMultiwordKeywords "indirect enum"
174176
" }}}
@@ -224,6 +226,7 @@ syntax region swiftGenericsWrapper start="\v\<" end="\v\>" contains=swiftType tr
224226
syntax region swiftLiteralWrapper start="\v\=\s*" skip="\v[^\[\]]\(\)" end="\v(\[\]|\(\))" contains=ALL transparent oneline
225227
syntax region swiftReturnWrapper start="\v-\>\s*" end="\v(\{|$)" contains=swiftType transparent oneline
226228
syntax match swiftType "\v<\u\w*" contained containedin=swiftTypeWrapper,swiftLiteralWrapper,swiftGenericsWrapper,swiftTypeCastWrapper
229+
syntax match swiftTypeDeclaration /->/ skipwhite nextgroup=swiftType
227230

228231
syntax keyword swiftImports import
229232
syntax keyword swiftCastKeyword is as contained
@@ -253,6 +256,7 @@ highlight default link swiftMarker Comment
253256

254257
highlight default link swiftString String
255258
highlight default link swiftInterpolatedWrapper Delimiter
259+
highlight default link swiftTypeDeclaration Delimiter
256260
highlight default link swiftNumber Number
257261
highlight default link swiftBoolean Boolean
258262

@@ -271,6 +275,7 @@ highlight default link swiftPreprocessor PreProc
271275
highlight default link swiftMethod Function
272276
highlight default link swiftProperty Identifier
273277

278+
highlight default link swiftDefinitionModifier Define
274279
highlight default link swiftConditionStatement PreProc
275280
highlight default link swiftAvailability Normal
276281
highlight default link swiftAvailabilityArg Normal

0 commit comments

Comments
 (0)