@@ -105,7 +105,7 @@ extension ASTGenVisitor {
105
105
underlyingType: self . generate ( type: node. initializer. value) ,
106
106
genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
107
107
)
108
- decl. asDecl. setAttrs ( attrs. attributes)
108
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
109
109
return decl
110
110
}
111
111
@@ -129,7 +129,7 @@ extension ASTGenVisitor {
129
129
end: node. memberBlock. rightBrace
130
130
)
131
131
)
132
- decl. asDecl. setAttrs ( attrs. attributes)
132
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
133
133
134
134
let members = self . withDeclContext ( decl. asDeclContext) {
135
135
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -163,7 +163,7 @@ extension ASTGenVisitor {
163
163
end: node. memberBlock. rightBrace
164
164
)
165
165
)
166
- decl. asDecl. setAttrs ( attrs. attributes)
166
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
167
167
168
168
let members = self . withDeclContext ( decl. asDeclContext) {
169
169
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -198,7 +198,7 @@ extension ASTGenVisitor {
198
198
) ,
199
199
isActor: false
200
200
)
201
- decl. asDecl. setAttrs ( attrs. attributes)
201
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
202
202
203
203
let members = self . withDeclContext ( decl. asDeclContext) {
204
204
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -233,7 +233,7 @@ extension ASTGenVisitor {
233
233
) ,
234
234
isActor: true
235
235
)
236
- decl. asDecl. setAttrs ( attrs. attributes)
236
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
237
237
238
238
let members = self . withDeclContext ( decl. asDeclContext) {
239
239
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -270,7 +270,7 @@ extension ASTGenVisitor {
270
270
end: node. memberBlock. rightBrace
271
271
)
272
272
)
273
- decl. asDecl. setAttrs ( attrs. attributes)
273
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
274
274
275
275
let members = self . withDeclContext ( decl. asDeclContext) {
276
276
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -300,7 +300,7 @@ extension ASTGenVisitor {
300
300
defaultType: self . generate ( type: node. initializer? . value) ,
301
301
genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
302
302
)
303
- decl. asDecl. setAttrs ( attrs. attributes)
303
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
304
304
return decl
305
305
}
306
306
}
@@ -322,7 +322,7 @@ extension ASTGenVisitor {
322
322
end: node. memberBlock. rightBrace
323
323
)
324
324
)
325
- decl. asDecl. setAttrs ( attrs. attributes)
325
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
326
326
327
327
let members = self . withDeclContext ( decl. asDeclContext) {
328
328
self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -364,7 +364,7 @@ extension ASTGenVisitor {
364
364
guard let elemDecl = self . generate ( enumCaseElement: elem) else {
365
365
return nil
366
366
}
367
- elemDecl. asDecl. setAttrs ( attrs. attributes)
367
+ elemDecl. asDecl. attachParsedAttrs ( attrs. attributes)
368
368
return elemDecl
369
369
} )
370
370
return . createParsed(
@@ -439,7 +439,7 @@ extension ASTGenVisitor {
439
439
throwsSpecifierLoc: self . generateSourceLoc ( node. effectSpecifiers? . throwsClause) ,
440
440
thrownType: self . generate ( type: node. effectSpecifiers? . thrownError)
441
441
)
442
- accessor. asDecl. setAttrs ( attrs)
442
+ accessor. asDecl. attachParsedAttrs ( attrs)
443
443
if let body = node. body {
444
444
self . withDeclContext ( accessor. asDeclContext) {
445
445
accessor. setParsedBody ( self . generate ( codeBlock: body) )
@@ -600,7 +600,7 @@ extension ASTGenVisitor {
600
600
arrowLoc: self . generateSourceLoc ( node. returnClause. arrow) ,
601
601
returnType: self . generate ( type: node. returnClause. type)
602
602
)
603
- subscriptDecl. asDecl. setAttrs ( attrs. attributes)
603
+ subscriptDecl. asDecl. attachParsedAttrs ( attrs. attributes)
604
604
605
605
if let accessors = node. accessorBlock {
606
606
let storage = subscriptDecl. asAbstractStorageDecl
@@ -635,7 +635,7 @@ extension ASTGenVisitor {
635
635
returnType: self . generate ( type: node. signature. returnClause? . type) ,
636
636
genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
637
637
)
638
- decl. asDecl. setAttrs ( attrs. attributes)
638
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
639
639
640
640
if let body = node. body {
641
641
self . withDeclContext ( decl. asDeclContext) {
@@ -662,7 +662,7 @@ extension ASTGenVisitor {
662
662
thrownType: self . generate ( type: node. signature. effectSpecifiers? . thrownError) ,
663
663
genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
664
664
)
665
- decl. asDecl. setAttrs ( attrs. attributes)
665
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
666
666
667
667
if let body = node. body {
668
668
self . withDeclContext ( decl. asDeclContext) {
@@ -681,7 +681,7 @@ extension ASTGenVisitor {
681
681
declContext: self . declContext,
682
682
deinitKeywordLoc: self . generateSourceLoc ( node. deinitKeyword)
683
683
)
684
- decl. asDecl. setAttrs ( attrs. attributes)
684
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
685
685
686
686
if let body = node. body {
687
687
self . withDeclContext ( decl. asDeclContext) {
@@ -711,7 +711,7 @@ extension ASTGenVisitor {
711
711
resultType: self . generate ( type: node. signature. returnClause? . type) ,
712
712
definition: self . generate ( expr: node. definition? . value)
713
713
)
714
- decl. asDecl. setAttrs ( attrs. attributes) ;
714
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
715
715
return decl;
716
716
}
717
717
}
@@ -733,7 +733,7 @@ extension ASTGenVisitor {
733
733
rightAngleLoc: info. rightAngleLoc,
734
734
args: info. arguments
735
735
)
736
- decl. asDecl. setAttrs ( attrs. attributes)
736
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
737
737
738
738
return decl
739
739
}
@@ -890,7 +890,7 @@ extension ASTGenVisitor {
890
890
lowerThanNames: self . generate ( precedenceGroupNameList: body. lowerThanRelation? . precedenceGroups) ,
891
891
rightBraceLoc: self . generateSourceLoc ( node. rightBrace)
892
892
)
893
- decl. asDecl. setAttrs ( attrs. attributes)
893
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
894
894
return decl
895
895
}
896
896
}
@@ -937,7 +937,7 @@ extension ASTGenVisitor {
937
937
self . generateLocatedIdentifier ( $0. name)
938
938
} . bridgedArray ( in: self )
939
939
)
940
- decl. asDecl. setAttrs ( attrs. attributes)
940
+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
941
941
return decl
942
942
}
943
943
}
0 commit comments