Skip to content

Commit 188b70d

Browse files
committed
vim: remove support for obsolete attribute syntax
Bracketed attributes have not been supported since pre-1.0. Let us consider them obsoleted.
1 parent a2c0448 commit 188b70d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

utils/vim/syntax/swift.vim

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@ syn keyword swiftKeyword
4949
\ while
5050

5151
syn keyword swiftTypeDefinition class extension protocol struct typealias enum skipwhite nextgroup=swiftTypeName
52-
syn region swiftTypeAttributes start="\[" end="\]" contained skipwhite nextgroup=swiftTypeName
5352
syn match swiftTypeName /\<[A-Za-z_][A-Za-z_0-9\.]*\>/ contained nextgroup=swiftTypeParameters
5453

5554
syn region swiftTypeParameters start="<" end=">" contained
5655

5756
syn keyword swiftMutating mutating skipwhite nextgroup=swiftFuncDefinition
58-
syn keyword swiftFuncDefinition func skipwhite nextgroup=swiftFuncAttributes,swiftFuncName,swiftOperator
59-
syn region swiftFuncAttributes start="\[" end="\]" contained skipwhite nextgroup=swiftFuncName,swiftOperator
57+
syn keyword swiftFuncDefinition func skipwhite nextgroup=swiftFuncName,swiftOperator
6058
syn match swiftFuncName /\<[A-Za-z_][A-Za-z_0-9]*\>/ contained skipwhite nextgroup=swiftTypeParameters
6159
syn keyword swiftFuncKeyword subscript init destructor nextgroup=swiftTypeParameters
6260

@@ -68,8 +66,8 @@ syn keyword swiftDefinitionModifier static public internal private
6866

6967
syn match swiftImplicitVarName /\$\<[A-Za-z_0-9]\+\>/
7068

71-
syn match swiftTypeDeclaration /:/ skipwhite nextgroup=swiftTypeAttributes,swiftTypeName
72-
syn match swiftTypeDeclaration /->/ skipwhite nextgroup=swiftTypeAttributes,swiftTypeName
69+
syn match swiftTypeDeclaration /:/ skipwhite nextgroup=swiftTypeName
70+
syn match swiftTypeDeclaration /->/ skipwhite nextgroup=swiftTypeName
7371

7472
syn keyword swiftIdentifierKeyword metatype super self Self
7573

@@ -111,11 +109,9 @@ hi def link swiftKeyword Statement
111109
hi def link swiftTypeDefinition Define
112110
hi def link swiftTypeName Type
113111
hi def link swiftTypeParameters Special
114-
hi def link swiftTypeAttributes PreProc
115112
hi def link swiftFuncDefinition Define
116113
hi def link swiftDefinitionModifier Define
117114
hi def link swiftFuncName Function
118-
hi def link swiftFuncAttributes PreProc
119115
hi def link swiftFuncKeyword Function
120116
hi def link swiftVarDefinition Define
121117
hi def link swiftVarName Identifier

0 commit comments

Comments
 (0)