|
10 | 10 | //
|
11 | 11 | //===----------------------------------------------------------------------===//
|
12 | 12 |
|
13 |
| -import _SwiftSyntaxTestSupport |
14 | 13 | import SwiftDiagnostics
|
15 | 14 | import SwiftSyntax
|
16 | 15 | import SwiftParser
|
@@ -191,45 +190,6 @@ class PrintDiags: ParsableCommand {
|
191 | 190 | }
|
192 | 191 | }
|
193 | 192 |
|
194 |
| -class PrintInitCall: ParsableCommand { |
195 |
| - static var configuration = CommandConfiguration( |
196 |
| - commandName: "print-init", |
197 |
| - abstract: "Print a Swift expression that creates this tree" |
198 |
| - ) |
199 |
| - |
200 |
| - required init() {} |
201 |
| - |
202 |
| - @Argument(help: "The source file that should be parsed; if omitted, use stdin") |
203 |
| - var sourceFile: String? |
204 |
| - |
205 |
| - @Option(name: .long, help: "Interpret input according to a specific Swift language version number") |
206 |
| - var swiftVersion: String? |
207 |
| - |
208 |
| - @Option(name: .long, help: "Enable or disable the use of forward slash regular-expression literal syntax") |
209 |
| - var enableBareSlashRegex: Bool? |
210 |
| - |
211 |
| - @Flag(name: .long, help: "Perform sequence folding with the standard operators") |
212 |
| - var foldSequences: Bool = false |
213 |
| - |
214 |
| - func run() throws { |
215 |
| - let source = try getContentsOfSourceFile(at: sourceFile) |
216 |
| - |
217 |
| - try source.withUnsafeBufferPointer { sourceBuffer in |
218 |
| - var tree = try Parser.parse( |
219 |
| - source: sourceBuffer, |
220 |
| - languageVersion: swiftVersion, |
221 |
| - enableBareSlashRegexLiteral: enableBareSlashRegex |
222 |
| - ) |
223 |
| - |
224 |
| - if foldSequences { |
225 |
| - tree = foldAllSequences(tree).0.as(SourceFileSyntax.self)! |
226 |
| - } |
227 |
| - |
228 |
| - print(tree.debugInitCall) |
229 |
| - } |
230 |
| - } |
231 |
| -} |
232 |
| - |
233 | 193 | class PrintTree: ParsableCommand {
|
234 | 194 | static var configuration = CommandConfiguration(
|
235 | 195 | commandName: "print-tree",
|
|
0 commit comments