Skip to content

Commit b0aac5c

Browse files
committed
Merge pull request #86 from keith/ks/indirect-case
Only highlight indirect when followed by case
2 parents 345b270 + b4262ec commit b0aac5c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

example/example.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@ enum Card : Int {
168168
case Heart
169169
case Diamond
170170
case Club
171+
indirect case Foo(a: Card)
171172
}
172173

174+
let indirect = 5
175+
173176
struct foo : bar {
174177
switch (foo) {
175178
case foo:

syntax/swift.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ syntax keyword swiftKeywords
127127
\ if
128128
\ import
129129
\ in
130-
\ indirect
131130
\ infix
132131
\ init
133132
\ inout
@@ -165,6 +164,8 @@ syntax keyword swiftKeywords
165164
\ where
166165
\ while
167166
\ willSet
167+
168+
syntax match swiftMultiwordKeywords "indirect case"
168169
" }}}
169170

170171
" Names surrounded by backticks. This aren't limited to keywords because 1)
@@ -252,6 +253,7 @@ highlight default link swiftBoolean Boolean
252253
highlight default link swiftOperator Operator
253254
highlight default link swiftCastKeyword Keyword
254255
highlight default link swiftKeywords Keyword
256+
highlight default link swiftMultiwordKeywords Keyword
255257
highlight default link swiftEscapedReservedWord Normal
256258
highlight default link swiftClosureArgument Operator
257259
highlight default link swiftAttributes PreProc

0 commit comments

Comments
 (0)