mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Add the annotations to the JSON.
This commit is contained in:
parent
abd037796a
commit
6b781622b6
@ -91,7 +91,7 @@ extension JSON {
|
||||
let arguments = BoundsCheckedArray(array: Process.arguments)
|
||||
if let a = arguments[1].flatMap(JSON.init), b = arguments[2].flatMap(JSON.init) {
|
||||
let diff = Algorithm<Term, Diff>(a.term, b.term).evaluate(Cofree.equals(annotation: const(true), leaf: ==))
|
||||
if let JSON = NSString(data: diff.JSON(ifPure: { $0.JSON { $0.JSON(annotation: const([:]), leaf: { $0.JSON }) } }, ifLeaf: { $0.JSON }).serialize(), encoding: NSUTF8StringEncoding) {
|
||||
if let JSON = NSString(data: diff.JSON(ifPure: { $0.JSON { $0.JSON } }, ifLeaf: { $0.JSON }).serialize(), encoding: NSUTF8StringEncoding) {
|
||||
print(JSON)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user