@@ -398,7 +398,7 @@ public class AttributeRemover: SyntaxRewriter {
398
398
self . predicate = predicate
399
399
}
400
400
401
- public override func visitAttributeListSyntax ( _ node: AttributeListSyntax ) -> AttributeListSyntax {
401
+ public override func visit ( _ node: AttributeListSyntax ) -> AttributeListSyntax {
402
402
var filteredAttributes : [ AttributeListSyntax . Element ] = [ ]
403
403
for case . attribute( let attribute) in node {
404
404
if self . predicate ( attribute) {
@@ -584,7 +584,7 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
584
584
return nil
585
585
}
586
586
587
- override func visitCodeBlockItemListSyntax ( _ node: CodeBlockItemListSyntax ) -> CodeBlockItemListSyntax {
587
+ override func visit ( _ node: CodeBlockItemListSyntax ) -> CodeBlockItemListSyntax {
588
588
var newItems : [ CodeBlockItemSyntax ] = [ ]
589
589
func addResult( _ node: CodeBlockItemSyntax ) {
590
590
// Expand freestanding macro.
@@ -600,7 +600,7 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
600
600
newItems. append ( node)
601
601
case . notAMacro:
602
602
// Recurse on the child node
603
- newItems. append ( visitCodeBlockItemSyntax ( node) )
603
+ newItems. append ( visit ( node) )
604
604
}
605
605
606
606
// Expand any peer macro on this item.
@@ -625,7 +625,7 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
625
625
return CodeBlockItemListSyntax ( newItems)
626
626
}
627
627
628
- override func visitMemberBlockItemListSyntax ( _ node: MemberBlockItemListSyntax ) -> MemberBlockItemListSyntax {
628
+ override func visit ( _ node: MemberBlockItemListSyntax ) -> MemberBlockItemListSyntax {
629
629
let parentDeclGroup = node
630
630
. parent?
631
631
. as ( MemberBlockSyntax . self) ?
@@ -645,7 +645,7 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
645
645
newItems. append ( node)
646
646
case . notAMacro:
647
647
// Recurse on the child node.
648
- newItems. append ( visitMemberBlockItemSyntax ( node) )
648
+ newItems. append ( visit ( node) )
649
649
}
650
650
651
651
// Expand any peer macro on this member.
@@ -691,8 +691,8 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
691
691
return . init( newItems)
692
692
}
693
693
694
- override func visitVariableDeclSyntax ( _ node: VariableDeclSyntax ) -> DeclSyntax {
695
- var node = super. visitVariableDeclSyntax ( node) . cast ( VariableDeclSyntax . self)
694
+ override func visit ( _ node: VariableDeclSyntax ) -> DeclSyntax {
695
+ var node = super. visit ( node) . cast ( VariableDeclSyntax . self)
696
696
697
697
guard !macroAttributes( attachedTo: DeclSyntax ( node) , ofType: AccessorMacro . Type. self) . isEmpty else {
698
698
return DeclSyntax ( node)
@@ -706,8 +706,8 @@ private class MacroApplication<Context: MacroExpansionContext>: SyntaxRewriter {
706
706
return DeclSyntax ( node)
707
707
}
708
708
709
- override func visitSubscriptDeclSyntax ( _ node: SubscriptDeclSyntax ) -> DeclSyntax {
710
- var node = super. visitSubscriptDeclSyntax ( node) . cast ( SubscriptDeclSyntax . self)
709
+ override func visit ( _ node: SubscriptDeclSyntax ) -> DeclSyntax {
710
+ var node = super. visit ( node) . cast ( SubscriptDeclSyntax . self)
711
711
node. accessorBlock = expandAccessors ( of: node, existingAccessors: node. accessorBlock)
712
712
return DeclSyntax ( node)
713
713
}
0 commit comments