@@ -105,7 +105,7 @@ extension ASTGenVisitor {
105105 underlyingType: self . generate ( type: node. initializer. value) ,
106106 genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
107107 )
108- decl. asDecl. setAttrs ( attrs. attributes)
108+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
109109 return decl
110110 }
111111
@@ -129,7 +129,7 @@ extension ASTGenVisitor {
129129 end: node. memberBlock. rightBrace
130130 )
131131 )
132- decl. asDecl. setAttrs ( attrs. attributes)
132+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
133133
134134 let members = self . withDeclContext ( decl. asDeclContext) {
135135 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -163,7 +163,7 @@ extension ASTGenVisitor {
163163 end: node. memberBlock. rightBrace
164164 )
165165 )
166- decl. asDecl. setAttrs ( attrs. attributes)
166+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
167167
168168 let members = self . withDeclContext ( decl. asDeclContext) {
169169 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -198,7 +198,7 @@ extension ASTGenVisitor {
198198 ) ,
199199 isActor: false
200200 )
201- decl. asDecl. setAttrs ( attrs. attributes)
201+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
202202
203203 let members = self . withDeclContext ( decl. asDeclContext) {
204204 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -233,7 +233,7 @@ extension ASTGenVisitor {
233233 ) ,
234234 isActor: true
235235 )
236- decl. asDecl. setAttrs ( attrs. attributes)
236+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
237237
238238 let members = self . withDeclContext ( decl. asDeclContext) {
239239 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -270,7 +270,7 @@ extension ASTGenVisitor {
270270 end: node. memberBlock. rightBrace
271271 )
272272 )
273- decl. asDecl. setAttrs ( attrs. attributes)
273+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
274274
275275 let members = self . withDeclContext ( decl. asDeclContext) {
276276 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -300,7 +300,7 @@ extension ASTGenVisitor {
300300 defaultType: self . generate ( type: node. initializer? . value) ,
301301 genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
302302 )
303- decl. asDecl. setAttrs ( attrs. attributes)
303+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
304304 return decl
305305 }
306306}
@@ -322,7 +322,7 @@ extension ASTGenVisitor {
322322 end: node. memberBlock. rightBrace
323323 )
324324 )
325- decl. asDecl. setAttrs ( attrs. attributes)
325+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
326326
327327 let members = self . withDeclContext ( decl. asDeclContext) {
328328 self . generate ( memberBlockItemList: node. memberBlock. members)
@@ -364,7 +364,7 @@ extension ASTGenVisitor {
364364 guard let elemDecl = self . generate ( enumCaseElement: elem) else {
365365 return nil
366366 }
367- elemDecl. asDecl. setAttrs ( attrs. attributes)
367+ elemDecl. asDecl. attachParsedAttrs ( attrs. attributes)
368368 return elemDecl
369369 } )
370370 return . createParsed(
@@ -439,7 +439,7 @@ extension ASTGenVisitor {
439439 throwsSpecifierLoc: self . generateSourceLoc ( node. effectSpecifiers? . throwsClause) ,
440440 thrownType: self . generate ( type: node. effectSpecifiers? . thrownError)
441441 )
442- accessor. asDecl. setAttrs ( attrs)
442+ accessor. asDecl. attachParsedAttrs ( attrs)
443443 if let body = node. body {
444444 self . withDeclContext ( accessor. asDeclContext) {
445445 accessor. setParsedBody ( self . generate ( codeBlock: body) )
@@ -600,7 +600,7 @@ extension ASTGenVisitor {
600600 arrowLoc: self . generateSourceLoc ( node. returnClause. arrow) ,
601601 returnType: self . generate ( type: node. returnClause. type)
602602 )
603- subscriptDecl. asDecl. setAttrs ( attrs. attributes)
603+ subscriptDecl. asDecl. attachParsedAttrs ( attrs. attributes)
604604
605605 if let accessors = node. accessorBlock {
606606 let storage = subscriptDecl. asAbstractStorageDecl
@@ -635,7 +635,7 @@ extension ASTGenVisitor {
635635 returnType: self . generate ( type: node. signature. returnClause? . type) ,
636636 genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
637637 )
638- decl. asDecl. setAttrs ( attrs. attributes)
638+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
639639
640640 if let body = node. body {
641641 self . withDeclContext ( decl. asDeclContext) {
@@ -662,7 +662,7 @@ extension ASTGenVisitor {
662662 thrownType: self . generate ( type: node. signature. effectSpecifiers? . thrownError) ,
663663 genericWhereClause: self . generate ( genericWhereClause: node. genericWhereClause)
664664 )
665- decl. asDecl. setAttrs ( attrs. attributes)
665+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
666666
667667 if let body = node. body {
668668 self . withDeclContext ( decl. asDeclContext) {
@@ -681,7 +681,7 @@ extension ASTGenVisitor {
681681 declContext: self . declContext,
682682 deinitKeywordLoc: self . generateSourceLoc ( node. deinitKeyword)
683683 )
684- decl. asDecl. setAttrs ( attrs. attributes)
684+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
685685
686686 if let body = node. body {
687687 self . withDeclContext ( decl. asDeclContext) {
@@ -711,7 +711,7 @@ extension ASTGenVisitor {
711711 resultType: self . generate ( type: node. signature. returnClause? . type) ,
712712 definition: self . generate ( expr: node. definition? . value)
713713 )
714- decl. asDecl. setAttrs ( attrs. attributes) ;
714+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
715715 return decl;
716716 }
717717}
@@ -733,7 +733,7 @@ extension ASTGenVisitor {
733733 rightAngleLoc: info. rightAngleLoc,
734734 args: info. arguments
735735 )
736- decl. asDecl. setAttrs ( attrs. attributes)
736+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
737737
738738 return decl
739739 }
@@ -890,7 +890,7 @@ extension ASTGenVisitor {
890890 lowerThanNames: self . generate ( precedenceGroupNameList: body. lowerThanRelation? . precedenceGroups) ,
891891 rightBraceLoc: self . generateSourceLoc ( node. rightBrace)
892892 )
893- decl. asDecl. setAttrs ( attrs. attributes)
893+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
894894 return decl
895895 }
896896}
@@ -937,7 +937,7 @@ extension ASTGenVisitor {
937937 self . generateLocatedIdentifier ( $0. name)
938938 } . bridgedArray ( in: self )
939939 )
940- decl. asDecl. setAttrs ( attrs. attributes)
940+ decl. asDecl. attachParsedAttrs ( attrs. attributes)
941941 return decl
942942 }
943943}
0 commit comments