mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Simplify the Diff constructor.
This commit is contained in:
parent
ccc57c6411
commit
00234c1365
@ -162,14 +162,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Diff(json) {
|
function Diff(object) {
|
||||||
if (json.pure != null) {
|
if (object.pure != null) { this.pure = object.pure; }
|
||||||
this.pure = new Patch(json.pure);
|
if (object.roll != null) { this.roll = object.roll; }
|
||||||
}
|
|
||||||
if (json.roll != null) {
|
|
||||||
this.ranges = json.roll.extract;
|
|
||||||
this.roll = new Syntax(json.roll.unwrap, function(x) { return new Diff(x); });
|
|
||||||
}
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user