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

Syntax constructors don’t take the strings.

This commit is contained in:
Rob Rix 2015-10-21 16:53:31 -04:00
parent f92daa8aeb
commit cc7030701e

View File

@ -134,23 +134,23 @@
if (patch.replace != null) { return new Replace(patch.replace.before, patch.replace.after, a, b); }
}
function Indexed(array, a, b, continuation) {
function Indexed(array, continuation) {
this.values = [];
for (index in array) {
this.values.push(continuation(array[index], a, b));
this.values.push(continuation(array[index]));
}
return this;
}
function Keyed(object, a, b, continuation) {
function Keyed(object, continuation) {
this.values = {};
for (key in object) {
this.values[key] = continuation(object[key], a, b);
this.values[key] = continuation(object[key]);
}
return this;
}
function Leaf(object, a, b) {
function Leaf(object) {
this.value = object;
return this;
}