Adjusting refactor to better emulate map.

This commit is contained in:
Timothy Jones
2010-10-20 12:51:34 +13:00
parent 8fff6e9baf
commit 8c4a48d9d0
4 changed files with 35 additions and 209 deletions

View File

@@ -6,168 +6,6 @@
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
}, __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
if (typeof parent.extended === "function") parent.extended(child);
child.__super__ = parent.prototype;
};
Scope = require('./scope').Scope;
_ref = require('./helpers'), compact = _ref.compact, flatten = _ref.flatten, merge = _ref.merge, del = _ref.del, include = _ref.include, starts = _ref.starts, ends = _ref.ends, last = _ref.last;
@@ -412,7 +250,6 @@
exports.Literal = (function() {
Literal = (function() {
function Literal(_arg) {
var _arg;
this.value = _arg;
Literal.__super__.constructor.call(this);
return this;
@@ -450,7 +287,6 @@
exports.Return = (function() {
Return = (function() {
function Return(_arg) {
var _arg;
this.expression = _arg;
Return.__super__.constructor.call(this);
return this;
@@ -486,7 +322,6 @@
exports.Value = (function() {
Value = (function() {
function Value(_arg, _arg2, tag) {
var _arg, _arg2;
this.properties = _arg2;
this.base = _arg;
Value.__super__.constructor.call(this);
@@ -608,7 +443,6 @@
exports.Comment = (function() {
Comment = (function() {
function Comment(_arg) {
var _arg;
this.comment = _arg;
Comment.__super__.constructor.call(this);
return this;
@@ -626,7 +460,6 @@
exports.Call = (function() {
Call = (function() {
function Call(variable, _arg, _arg2) {
var _arg, _arg2;
this.soakNode = _arg2;
this.args = _arg;
Call.__super__.constructor.call(this);
@@ -765,7 +598,6 @@
exports.Extends = (function() {
Extends = (function() {
function Extends(_arg, _arg2) {
var _arg, _arg2;
this.parent = _arg2;
this.child = _arg;
Extends.__super__.constructor.call(this);
@@ -785,7 +617,6 @@
exports.Accessor = (function() {
Accessor = (function() {
function Accessor(_arg, tag) {
var _arg;
this.name = _arg;
Accessor.__super__.constructor.call(this);
this.prototype = tag === 'prototype' ? '.prototype' : '';
@@ -808,7 +639,6 @@
exports.Index = (function() {
Index = (function() {
function Index(_arg) {
var _arg;
this.index = _arg;
Index.__super__.constructor.call(this);
return this;
@@ -831,7 +661,6 @@
exports.Range = (function() {
Range = (function() {
function Range(_arg, _arg2, tag) {
var _arg, _arg2;
this.to = _arg2;
this.from = _arg;
Range.__super__.constructor.call(this);
@@ -920,7 +749,6 @@
exports.Slice = (function() {
Slice = (function() {
function Slice(_arg) {
var _arg;
this.range = _arg;
Slice.__super__.constructor.call(this);
return this;
@@ -1003,7 +831,6 @@
exports.ArrayLiteral = (function() {
ArrayLiteral = (function() {
function ArrayLiteral(_arg) {
var _arg;
this.objects = _arg;
ArrayLiteral.__super__.constructor.call(this);
this.objects || (this.objects = []);
@@ -1049,7 +876,6 @@
exports.Class = (function() {
Class = (function() {
function Class(variable, _arg, _arg2) {
var _arg, _arg2;
this.properties = _arg2;
this.parent = _arg;
Class.__super__.constructor.call(this);
@@ -1148,7 +974,6 @@
exports.Assign = (function() {
Assign = (function() {
function Assign(_arg, _arg2, _arg3) {
var _arg, _arg2, _arg3;
this.context = _arg3;
this.value = _arg2;
this.variable = _arg;
@@ -1282,7 +1107,6 @@
exports.Code = (function() {
Code = (function() {
function Code(_arg, _arg2, tag) {
var _arg, _arg2;
this.body = _arg2;
this.params = _arg;
Code.__super__.constructor.call(this);
@@ -1373,7 +1197,6 @@
exports.Param = (function() {
Param = (function() {
function Param(_arg, _arg2, _arg3) {
var _arg, _arg2, _arg3;
this.splat = _arg3;
this.attach = _arg2;
this.name = _arg;
@@ -1642,7 +1465,6 @@
exports.In = (function() {
In = (function() {
function In(_arg, _arg2) {
var _arg, _arg2;
this.array = _arg2;
this.object = _arg;
In.__super__.constructor.call(this);
@@ -1681,7 +1503,6 @@
exports.Try = (function() {
Try = (function() {
function Try(_arg, _arg2, _arg3, _arg4) {
var _arg, _arg2, _arg3, _arg4;
this.ensure = _arg4;
this.recovery = _arg3;
this.error = _arg2;
@@ -1718,7 +1539,6 @@
exports.Throw = (function() {
Throw = (function() {
function Throw(_arg) {
var _arg;
this.expression = _arg;
Throw.__super__.constructor.call(this);
return this;
@@ -1737,7 +1557,6 @@
exports.Existence = (function() {
Existence = (function() {
function Existence(_arg) {
var _arg;
this.expression = _arg;
Existence.__super__.constructor.call(this);
return this;
@@ -1757,7 +1576,6 @@
exports.Parens = (function() {
Parens = (function() {
function Parens(_arg) {
var _arg;
this.expression = _arg;
Parens.__super__.constructor.call(this);
return this;
@@ -1794,7 +1612,7 @@
exports.For = (function() {
For = (function() {
function For(_arg, source, _arg2, _arg3) {
var _arg, _arg2, _arg3, _ref2;
var _ref2;
this.index = _arg3;
this.name = _arg2;
this.body = _arg;
@@ -1953,7 +1771,6 @@
exports.Switch = (function() {
Switch = (function() {
function Switch(_arg, _arg2, _arg3) {
var _arg, _arg2, _arg3;
this.otherwise = _arg3;
this.cases = _arg2;
this.subject = _arg;
@@ -2010,7 +1827,6 @@
exports.If = (function() {
If = (function() {
function If(condition, _arg, tags) {
var _arg;
this.body = _arg;
this.tags = tags || (tags = {});
this.condition = tags.invert ? condition.invert() : condition;