1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

/dev/null → .Empty

This commit is contained in:
Rob Rix 2015-09-23 17:01:09 -04:00
parent bf350ee2ed
commit 5524e85653

View File

@ -5,6 +5,10 @@ let arguments = BoundsCheckedArray(array: Process.arguments)
extension Term {
init?(path: String) {
guard path != "/dev/null" else {
self = .Empty
return
}
guard let term = File(path: path)
.map(Structure.init)
.map({ $0.dictionary })