Skip to content

Commit c97cf21

Browse files
Remove SwiftSyntax
1 parent d40d5da commit c97cf21

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

Package.resolved

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ let package = Package(
88
],
99
dependencies: [
1010
.package(url: "https://github.com/apple/swift-experimental-string-processing.git", branch: "main"),
11-
.package(url: "https://github.com/apple/swift-syntax", branch: "main"),
1211
.package(url: "https://github.com/vapor/vapor.git", from: "4.113.2"),
1312
.package(url: "https://github.com/vapor/leaf.git", from: "4.4.1"),
1413
],
@@ -18,7 +17,6 @@ let package = Package(
1817
dependencies: [
1918
.product(name: "_StringProcessing", package: "swift-experimental-string-processing"),
2019
.product(name: "_RegexParser", package: "swift-experimental-string-processing"),
21-
.product(name: "SwiftSyntax", package: "swift-syntax"),
2220
],
2321
swiftSettings: [
2422
.unsafeFlags(["-Xfrontend", "-disable-availability-checking"]),

Sources/BuilderTester/Main.swift

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import Foundation
2-
//import SwiftSyntax
3-
//import SwiftSyntaxParser
42

53
@main
64
struct Main {
@@ -12,43 +10,6 @@ struct Main {
1210
let regexVarName = "regex_\(UUID().uuidString.replacingOccurrences(of: "-", with: ""))"
1311
var code = ""
1412
code = "let \(regexVarName) = \(builder)"
15-
// let sourceFile = try SyntaxParser.parse(source: builder)
16-
//
17-
// for statement in sourceFile.statements {
18-
// let syntaxes = statement.children.map { $0 }
19-
// if !syntaxes.isEmpty {
20-
// if let _ = syntaxes[0].as(FunctionCallExprSyntax.self) {
21-
// code += """
22-
//
23-
// let \(regexVarName) = \(statement)
24-
// """
25-
// break
26-
// } else if let variableDecl = syntaxes[0].as(VariableDeclSyntax.self) {
27-
// let bindings = variableDecl.bindings.map { $0 }
28-
// if let pattern = bindings[0].pattern.as(IdentifierPatternSyntax.self) {
29-
// if let initializer = bindings[0].initializer {
30-
// if let functionCallExpr = initializer.value.as(FunctionCallExprSyntax.self) {
31-
// if let calledExpression = functionCallExpr.calledExpression.as(IdentifierExprSyntax.self) {
32-
// if calledExpression.identifier.text == "Regex" {
33-
// code += """
34-
// \(statement)
35-
//
36-
// let \(regexVarName) = \(pattern.identifier.text)
37-
// """
38-
// break
39-
// }
40-
// }
41-
// }
42-
// }
43-
// }
44-
// }
45-
// }
46-
//
47-
// code += """
48-
//
49-
// \(statement)
50-
// """
51-
// }
5213

5314
let script = #"""
5415
import Foundation

0 commit comments

Comments
 (0)