@@ -16,67 +16,6 @@ import Foundation
1616import SwiftParser
1717import SwiftSyntax
1818
19- //final class Swift2JavaTranslateVisitor {
20- // func translate(decl node: DeclSyntax, into typeContext: ImportedNominalType?) {
21- // switch node.as(DeclSyntaxEnum.self) {
22- //
23- // case .structDecl(let node):
24- // self.translate(nominalTypeDecl: node, into: typeContext)
25- // case .enumDecl(let node):
26- // self.translate(nominalTypeDecl: node, into: typeContext)
27- // case .classDecl(let node):
28- // self.translate(nominalTypeDecl: node, into: typeContext)
29- // case .actorDecl(let node):
30- // self.translate(nominalTypeDecl: node, into: typeContext)
31- // case .protocolDecl(let node):
32- // self.translate(nominalTypeDecl: node, into: typeContext)
33- // case .extensionDecl(let node):
34- // self.translate(extensionDecl: node, into: typeContext)
35- //
36- // case .functionDecl(let node):
37- // self.translate(functionDecl: node, into: typeContext)
38- // case .subscriptDecl(let node):
39- // self.translate(subscriptDecl: node, into: typeContext)
40- // case .variableDecl(let node):
41- // self.translate(variableDecl: node, into: typeContext)
42- // }
43- // }
44- //
45- // func translate(sourceFile node: SourceFileSyntax) {
46- // for code in node.statements {
47- // guard let decl = code.item.as(DeclSyntax.self) else {
48- // return
49- // }
50- // self.translate(decl: decl, into: nil)
51- // }
52- // }
53- //
54- // func translate(nominalTypeDecl node: some NamedDeclSyntax & DeclGroupSyntax & WithAttributesSyntax & WithModifiersSyntax, into typeContext: ImportedNominalType?) {
55- // guard let importedNominal = translator.importedNominalType(node, typeContext) else {
56- // return
57- // }
58- // for member in node.memberBlock.members {
59- // self.translate(decl: member.decl, into: importedNominal)
60- // }
61- // }
62- //
63- // func translate(extensionDecl node: ExtensionDeclSyntax, into typeContext: ImportedNominalType?) throws {
64- // guard typeContext == nil else {
65- // return
66- // }
67- // }
68- //
69- // func translate(functionDecl node: FunctionDeclSyntax, into typeContext: ImportedNominalType?) throws {
70- // self.translator.importedFunc(node, typeContext)
71- // }
72- // func translate(subscriptDecl node: SubscriptDeclSyntax, into typeContext: ImportedNominalType?) throws {
73- // SwiftFunctionSignature(node, enclosingType: <#T##SwiftType?#>, symbolTable: SwiftSymbolTable)
74- // }
75- // func translate(variableDecl node: VariableDeclSyntax, into typeContext: ImportedNominalType?) throws {
76- // SwiftFunctionSignature(node, enclosingType: <#T##SwiftType?#>, symbolTable: SwiftSymbolTable)
77- // }
78- //}
79-
8019final class Swift2JavaVisitor : SyntaxVisitor {
8120 let translator : Swift2JavaTranslator
8221
0 commit comments