1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Construct leaves.

This commit is contained in:
Rob Rix 2015-10-21 16:22:19 -04:00
parent db8c04bd6f
commit b0bd628c4f

View File

@ -110,10 +110,14 @@
return this;
}
function Leaf(object, a, b) {
return this;
}
function syntax(json, a, b, continuation) {
if (json instanceof Array) { return new Indexed(json, a, b, continuation); }
if (json instanceof Object) { return new Keyed(json, a, b, continuation); }
return continuation(json, a, b);
return new Leaf(json, a, b);
}
function diff(json, a, b) {