diff --git a/example/example.swift b/example/example.swift index 4793d5e..7a37f0b 100644 --- a/example/example.swift +++ b/example/example.swift @@ -309,3 +309,8 @@ public let fareEstimate: FareEstimate //= (nil, nil) // comment should be highli key = map.optionalFrom("string") ?? [] key = map.optionalFrom("string") thing = map.optionalFrom("string") ?? .Fallback + +guard let path = NSBundle.mainBundle().pathForResource(imageName, ofType: "png"), + let data = NSData(contentsOfFile: path) else +{ +} diff --git a/syntax/swift.vim b/syntax/swift.vim index 787c5c8..5405a0d 100644 --- a/syntax/swift.vim +++ b/syntax/swift.vim @@ -199,9 +199,9 @@ syntax keyword swiftStructure \ struct \ enum -syntax region swiftTypeWrapper start="\v:\s*" skip="\s*,\s*$*\s*" end="$\|/"me=e-1 contains=swiftString,swiftBoolean,swiftNumber,swiftType,swiftGenericsWrapper transparent +syntax region swiftTypeWrapper start="\v:\s*" skip="\s*,\s*$*\s*" end="$\|/"me=e-1 contains=ALL transparent syntax region swiftGenericsWrapper start="\v\<" end="\v\>" contains=swiftType transparent oneline -syntax region swiftLiteralWrapper start="\v\=\s*" skip="\v[^\[\]]\(\)" end="\v(\[\]|\(\))" contains=swiftType,swiftString,swiftMethod,swiftOperator transparent oneline +syntax region swiftLiteralWrapper start="\v\=\s*" skip="\v[^\[\]]\(\)" end="\v(\[\]|\(\))" contains=ALL transparent oneline syntax region swiftReturnWrapper start="\v-\>\s*" end="\v(\{|$)" contains=swiftType transparent oneline syntax match swiftType "\v<\u\w*" contained containedin=swiftGenericsWrapper,swiftTypeWrapper,swiftLiteralWrapper,swiftGenericsWrapper