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

Terms have categories.

This commit is contained in:
Rob Rix 2015-10-13 21:36:14 -04:00
parent 30d1a5dee2
commit 8190064f48

View File

@ -76,3 +76,23 @@ extension Fix where A: CustomJSONConvertible {
return JSON { $0.JSON }
}
}
// MARK: - Categorizable
extension Fix: Categorizable {
public var categories: Set<Category> {
return []
}
}
extension Fix where A: Categorizable {
public var categories: Set<Category> {
switch self {
case let .In(.Leaf(a)):
return a.categories
default:
return []
}
}
}