File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Plugins/BridgeJS/Sources/BridgeJSCore Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public class ExportSwift {
2626 private var exportedEnums : [ ExportedEnum ] = [ ]
2727 private var exportedStructs : [ ExportedStruct ] = [ ]
2828 private var exportedProtocols : [ ExportedProtocol ] = [ ]
29- private var exportedProtocolNameByKey : [ String : String ] = [ : ]
3029 private var typeDeclResolver : TypeDeclResolver = TypeDeclResolver ( )
3130 private var sourceFiles : [ ( sourceFile: SourceFileSyntax , inputFilePath: String ) ] = [ ]
3231
@@ -1136,8 +1135,6 @@ public class ExportSwift {
11361135
11371136 stateStack. pop ( )
11381137
1139- parent. exportedProtocolNameByKey [ protocolUniqueKey] = name
1140-
11411138 return . skipChildren
11421139 }
11431140
@@ -1598,11 +1595,6 @@ public class ExportSwift {
15981595 return primitiveType
15991596 }
16001597
1601- let protocolKey = typeName
1602- if let protocolName = exportedProtocolNameByKey [ protocolKey] {
1603- return . swiftProtocol( protocolName)
1604- }
1605-
16061598 guard let typeDecl = typeDeclResolver. resolve ( type) else {
16071599 return nil
16081600 }
Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ class TypeDeclResolver {
6363 override func visitPost( _ node: EnumDeclSyntax ) {
6464 visitPostNominalDecl ( )
6565 }
66+ override func visit( _ node: ProtocolDeclSyntax ) -> SyntaxVisitorContinueKind {
67+ return visitNominalDecl ( node)
68+ }
69+ override func visitPost( _ node: ProtocolDeclSyntax ) {
70+ visitPostNominalDecl ( )
71+ }
6672
6773 override func visit( _ node: TypeAliasDeclSyntax ) -> SyntaxVisitorContinueKind {
6874 let name = node. name. text
You can’t perform that action at this time.
0 commit comments