Skip to content

Commit 295c7f3

Browse files
authored
Merge pull request #12715 from compnerd/sil-attributes
2 parents a075c30 + 03456c9 commit 295c7f3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

utils/vim/syntax/sil.vim

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ syn match silFunctionType skipwhite
3232
syn match silMetatypeType skipwhite
3333
\ /@\(\<thick\>\|\<thin\>\|\<objc\>\)/
3434

35+
" TODO: handle [tail_elems sil-type * sil-operand]
36+
syn region silAttribute contains=silAttributes
37+
\ start="\[" end="\]"
38+
syn keyword silAttributes contained containedin=silAttribute
39+
\ abort
40+
\ deinit
41+
\ delegatingself
42+
\ derivedself
43+
\ derivedselfonly
44+
\ dynamic
45+
\ exact
46+
\ init
47+
\ modify
48+
\ objc
49+
\ read
50+
\ rootself
51+
\ stack
52+
\ static
53+
\ strict
54+
\ unknown
55+
\ unsafe
56+
\ var
57+
3558
syn keyword swiftImport import skipwhite nextgroup=swiftImportModule
3659
syn match swiftImportModule /\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent
3760
syn match swiftImportComponent /\.\<[A-Za-z_][A-Za-z_0-9]*\>/ contained nextgroup=swiftImportComponent
@@ -132,5 +155,6 @@ hi def link silConventions Type
132155
hi def link silIdentifier Identifier
133156
hi def link silFunctionType Special
134157
hi def link silMetatypeType Special
158+
hi def link silAttribute PreProc
135159

136160
let b:current_syntax = "sil"

0 commit comments

Comments
 (0)