[swiftSyntax] Add test cases for the SyntaxClassifier

This commit is contained in:
Alex Hoppen
2018-07-25 23:20:27 -07:00
parent 775beece65
commit 179940b65b
9 changed files with 144 additions and 5 deletions

View File

@@ -95,9 +95,6 @@ public enum SyntaxTreeParser {
public static func parse(_ url: URL) throws -> SourceFileSyntax {
let swiftcRunner = try SwiftcRunner(sourceFile: url)
let result = try swiftcRunner.invoke()
guard result.wasSuccessful else {
throw ParserError.swiftcFailed(result.exitCode, result.stderr)
}
let syntaxTreeData = result.stdoutData
let deserializer = SyntaxTreeDeserializer()
return try deserializer.deserialize(syntaxTreeData)