1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Move the patch function up.

This commit is contained in:
Rob Rix 2015-10-23 13:47:33 -04:00
parent 968980e17b
commit 0667e3b30e

View File

@ -51,6 +51,12 @@
return node;
}
function patch(patch) {
if (patch.delete != null) { return new Delete(patch.delete); }
if (patch.insert != null) { return new Insert(patch.insert); }
if (patch.replace != null) { return new Replace(patch.replace.before, patch.replace.after); }
}
function Delete(before) {
this.before = new Term(before);
return this;
@ -187,12 +193,6 @@
return element;
}
function patch(patch) {
if (patch.delete != null) { return new Delete(patch.delete); }
if (patch.insert != null) { return new Insert(patch.insert); }
if (patch.replace != null) { return new Replace(patch.replace.before, patch.replace.after); }
}
function Indexed(array, continuation) {
this.values = [];
for (index in array) {