mirror of
https://github.com/github/semantic.git
synced 2024-12-24 07:25:44 +03:00
26 lines
420 B
Swift
26 lines
420 B
Swift
struct Info: Categorizable, CustomJSONConvertible, Equatable {
|
|
let range: Range<Int>
|
|
|
|
|
|
// MARK: Categorizable
|
|
|
|
let categories: Set<String>
|
|
|
|
|
|
// MARK: CustomJSONConvertible
|
|
|
|
var JSON: Doubt.JSON {
|
|
return [
|
|
"range": range.JSON,
|
|
"categories": Array(categories).JSON
|
|
]
|
|
}
|
|
}
|
|
|
|
func == (left: Info, right: Info) -> Bool {
|
|
return left.range == right.range && left.categories == right.categories
|
|
}
|
|
|
|
|
|
import Doubt
|