[sourcekitd] Rename module SwiftSourceKit to SwiftLang. (#14497)

The sourcekitd client library provides parsing APIs for SwiftSyntax users.
The internal use of sourcekit service is an implementation detail that end users
shouldn't worry about.
This commit is contained in:
Xi Ge
2018-02-08 17:26:00 -08:00
committed by GitHub
parent f9299e711c
commit 43435af7ee
6 changed files with 43 additions and 26 deletions

View File

@@ -6,7 +6,7 @@
import StdlibUnittest
import Foundation
import SwiftSyntax
import SwiftSourceKit
import SwiftLang
func getInput(_ file: String) -> URL {
var result = URL(fileURLWithPath: #file)
@@ -20,7 +20,7 @@ var DecodeTests = TestSuite("DecodeSyntax")
DecodeTests.test("Basic") {
expectDoesNotThrow({
let content = try SourceFileSyntax.encodeSourceFileSyntax(getInput("visitor.swift"))
let content = try SwiftLang.parse(getInput("visitor.swift"))
let source = try String(contentsOf: getInput("visitor.swift"))
let parsed = try SourceFileSyntax.decodeSourceFileSyntax(content)
expectEqual("\(parsed)", source)