@@ -45,7 +45,7 @@ extension DistributedResolvableMacro {
4545 return [ ]
4646 }
4747
48- let accessModifiers : String = proto. accessModifiersString
48+ let accessModifiers = proto. accessControlModifiers
4949
5050 let requirementStubs =
5151 proto. memberBlock. members // requirements
@@ -71,7 +71,7 @@ extension DistributedResolvableMacro {
7171 return [ extensionDecl. cast ( ExtensionDeclSyntax . self) ]
7272 }
7373
74- static func stubMethodDecl( access: String , _ requirement: MemberBlockItemListSyntax . Element ) -> String {
74+ static func stubMethodDecl( access: DeclModifierListSyntax , _ requirement: MemberBlockItemListSyntax . Element ) -> String {
7575 // do we need to stub a computed variable?
7676 if let variable = requirement. decl. as ( VariableDeclSyntax . self) {
7777 var accessorStubs : [ String ] = [ ]
@@ -142,7 +142,7 @@ extension DistributedResolvableMacro {
142142 """ , id: . invalidApplication)
143143 }
144144
145- let accessModifiers = proto. accessModifiersString
145+ let accessModifiers = proto. accessControlModifiers
146146
147147 for req in proto. genericWhereClause? . requirements ?? [ ] {
148148 switch req. requirement {
@@ -198,31 +198,16 @@ extension DistributedResolvableMacro {
198198 }
199199 }
200200
201- private static func typealiasActorSystem( access: String , _ proto: ProtocolDeclSyntax , _ type: TypeSyntax ) -> DeclSyntax {
202- " \( raw: access) typealias ActorSystem = \( type) "
201+ private static func typealiasActorSystem( access: DeclModifierListSyntax ,
202+ _ proto: ProtocolDeclSyntax ,
203+ _ type: TypeSyntax ) -> DeclSyntax {
204+ " \( access) typealias ActorSystem = \( type) "
203205 }
204206}
205207
206208// ===== -----------------------------------------------------------------------
207209// MARK: Convenience Extensions
208210
209- extension ProtocolDeclSyntax {
210- var accessModifiersString : String {
211- let modifiers = modifiers. filter { modifier in
212- modifier. isAccessControl
213- }
214-
215- guard !modifiers. isEmpty else {
216- return " "
217- }
218-
219- let string = modifiers
220- . map { " \( $0. trimmed) " }
221- . joined ( separator: " " )
222- return " \( string) "
223- }
224- }
225-
226211extension TypeSyntax {
227212 fileprivate var isActorSystem : Bool {
228213 self . trimmedDescription == " ActorSystem "
0 commit comments