ObjectLiteral -> Obj, ArrayLiteral -> Arr

This commit is contained in:
Jeremy Ashkenas 2010-10-24 11:35:47 -04:00
parent 55bf6450e7
commit cecae0f965
6 changed files with 46 additions and 46 deletions

View File

@ -60,10 +60,10 @@ break;case 32:this.$=new f.Literal(c[d-1+1-1]);break;case 33:this.$=new f.Litera
1+1-1]);break;case 52:this.$=new f.Existence(c[d-2+1-1]);break;case 53:this.$=new f.Code(c[d-5+2-1],c[d-5+5-1],c[d-5+4-1]);break;case 54:this.$=new f.Code([],c[d-2+2-1],c[d-2+1-1]);break;case 55:this.$="func";break;case 56:this.$="boundfunc";break;case 57:this.$=c[d-1+1-1];break;case 58:this.$=c[d-1+1-1];break;case 59:this.$=[];break;case 60:this.$=[c[d-1+1-1]];break;case 61:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 62:this.$=new f.Literal(c[d-1+1-1]);break;case 63:this.$=new f.Param(c[d-2+
2-1],true);break;case 64:this.$=new f.Param(c[d-2+1-1],false,true);break;case 65:this.$=new f.Param(c[d-3+2-1],true,true);break;case 66:this.$=new f.Splat(c[d-2+1-1]);break;case 67:this.$=new f.Value(c[d-1+1-1]);break;case 68:this.$=c[d-2+1-1].push(c[d-2+2-1]);break;case 69:this.$=new f.Value(c[d-2+1-1],[c[d-2+2-1]]);break;case 70:this.$=c[d-1+1-1];break;case 71:this.$=c[d-1+1-1];break;case 72:this.$=new f.Value(c[d-1+1-1]);break;case 73:this.$=new f.Value(c[d-1+1-1]);break;case 74:this.$=c[d-1+1-
1];break;case 75:this.$=new f.Value(c[d-1+1-1]);break;case 76:this.$=new f.Value(c[d-1+1-1]);break;case 77:this.$=c[d-1+1-1];break;case 78:this.$=new f.Accessor(c[d-2+2-1]);break;case 79:this.$=new f.Accessor(c[d-2+2-1],"prototype");break;case 80:this.$=new f.Accessor(new f.Literal("prototype"));break;case 81:this.$=new f.Accessor(c[d-2+2-1],"soak");break;case 82:this.$=c[d-1+1-1];break;case 83:this.$=new f.Slice(c[d-1+1-1]);break;case 84:this.$=new f.Index(c[d-3+2-1]);break;case 85:this.$=f.extend(c[d-
2+2-1],{soakNode:true});break;case 86:this.$=f.extend(c[d-2+2-1],{proto:true});break;case 87:this.$=new f.ObjectLiteral(c[d-4+2-1]);break;case 88:this.$=[];break;case 89:this.$=[c[d-1+1-1]];break;case 90:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 91:this.$=c[d-4+1-1].concat(c[d-4+4-1]);break;case 92:this.$=c[d-6+1-1].concat(c[d-6+4-1]);break;case 93:this.$=new f.Class(c[d-2+2-1]);break;case 94:this.$=new f.Class(c[d-4+2-1],c[d-4+4-1]);break;case 95:this.$=new f.Class(c[d-5+2-1],null,c[d-5+4-
2+2-1],{soakNode:true});break;case 86:this.$=f.extend(c[d-2+2-1],{proto:true});break;case 87:this.$=new f.Obj(c[d-4+2-1]);break;case 88:this.$=[];break;case 89:this.$=[c[d-1+1-1]];break;case 90:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 91:this.$=c[d-4+1-1].concat(c[d-4+4-1]);break;case 92:this.$=c[d-6+1-1].concat(c[d-6+4-1]);break;case 93:this.$=new f.Class(c[d-2+2-1]);break;case 94:this.$=new f.Class(c[d-4+2-1],c[d-4+4-1]);break;case 95:this.$=new f.Class(c[d-5+2-1],null,c[d-5+4-
1]);break;case 96:this.$=new f.Class(c[d-7+2-1],c[d-7+4-1],c[d-7+6-1]);break;case 97:this.$=new f.Class(null,null,c[d-4+3-1]);break;case 98:this.$=new f.Class(null,null,new f.Expressions);break;case 99:this.$=new f.Class(null,c[d-3+3-1],new f.Expressions);break;case 100:this.$=new f.Class(null,c[d-6+3-1],c[d-6+5-1]);break;case 101:this.$=c[d-1+1-1];break;case 102:this.$=new f.Assign(new f.Value(c[d-3+1-1]),c[d-3+3-1],"this");break;case 103:this.$=new f.Assign(new f.Value(c[d-5+1-1]),c[d-5+4-1],"this");
break;case 104:this.$=[];break;case 105:this.$=[c[d-1+1-1]];break;case 106:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 107:this.$=c[d-3+2-1];break;case 108:this.$=new f.Extends(c[d-3+1-1],c[d-3+3-1]);break;case 109:this.$=new f.Call(c[d-3+1-1],c[d-3+3-1],c[d-3+2-1]);break;case 110:this.$=new f.Call(c[d-3+1-1],c[d-3+3-1],c[d-3+2-1]);break;case 111:this.$=new f.Call("super",[new f.Splat(new f.Literal("arguments"))]);break;case 112:this.$=new f.Call("super",c[d-2+2-1]);break;case 113:this.$=false;
break;case 114:this.$=true;break;case 115:this.$=[];break;case 116:this.$=c[d-4+2-1];break;case 117:this.$=new f.Value(new f.Literal("this"));break;case 118:this.$=new f.Value(new f.Literal("this"));break;case 119:this.$=new f.Value(new f.Literal("this"),[new f.Accessor(c[d-2+2-1])],"this");break;case 120:this.$=new f.ArrayLiteral([]);break;case 121:this.$=new f.ArrayLiteral(c[d-4+2-1]);break;case 122:this.$=[c[d-1+1-1]];break;case 123:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 124:this.$=c[d-
break;case 114:this.$=true;break;case 115:this.$=[];break;case 116:this.$=c[d-4+2-1];break;case 117:this.$=new f.Value(new f.Literal("this"));break;case 118:this.$=new f.Value(new f.Literal("this"));break;case 119:this.$=new f.Value(new f.Literal("this"),[new f.Accessor(c[d-2+2-1])],"this");break;case 120:this.$=new f.Arr([]);break;case 121:this.$=new f.Arr(c[d-4+2-1]);break;case 122:this.$=[c[d-1+1-1]];break;case 123:this.$=c[d-3+1-1].concat(c[d-3+3-1]);break;case 124:this.$=c[d-
4+1-1].concat(c[d-4+4-1]);break;case 125:this.$=c[d-4+2-1];break;case 126:this.$=c[d-6+1-1].concat(c[d-6+4-1]);break;case 127:this.$=c[d-1+1-1];break;case 128:this.$=c[d-1+1-1];break;case 129:this.$=c[d-1+1-1];break;case 130:this.$=[].concat(c[d-3+1-1],c[d-3+3-1]);break;case 131:this.$=new f.Try(c[d-2+2-1]);break;case 132:this.$=new f.Try(c[d-3+2-1],c[d-3+3-1][0],c[d-3+3-1][1]);break;case 133:this.$=new f.Try(c[d-4+2-1],null,null,c[d-4+4-1]);break;case 134:this.$=new f.Try(c[d-5+2-1],c[d-5+3-1][0],
c[d-5+3-1][1],c[d-5+5-1]);break;case 135:this.$=[c[d-3+2-1],c[d-3+3-1]];break;case 136:this.$=new f.Throw(c[d-2+2-1]);break;case 137:this.$=new f.Parens(c[d-3+2-1]);break;case 138:this.$=new f.While(c[d-2+2-1]);break;case 139:this.$=new f.While(c[d-4+2-1],{guard:c[d-4+4-1]});break;case 140:this.$=new f.While(c[d-2+2-1],{invert:true});break;case 141:this.$=new f.While(c[d-4+2-1],{invert:true,guard:c[d-4+4-1]});break;case 142:this.$=c[d-2+1-1].addBody(c[d-2+2-1]);break;case 143:this.$=c[d-2+2-1].addBody(f.Expressions.wrap([c[d-
2+1-1]]));break;case 144:this.$=c[d-2+2-1].addBody(f.Expressions.wrap([c[d-2+1-1]]));break;case 145:this.$=c[d-1+1-1];break;case 146:this.$=(new f.While(new f.Literal("true"))).addBody(c[d-2+2-1]);break;case 147:this.$=(new f.While(new f.Literal("true"))).addBody(f.Expressions.wrap([c[d-2+2-1]]));break;case 148:this.$=new f.For(c[d-2+1-1],c[d-2+2-1]);break;case 149:this.$=new f.For(c[d-2+1-1],c[d-2+2-1]);break;case 150:this.$=new f.For(c[d-2+2-1],c[d-2+1-1]);break;case 151:this.$=c[d-1+1-1];break;
@ -331,9 +331,9 @@ this.tags.front;h=this.args;b=0;for(e=h.length;b<e;b++){g=h[b];if(g instanceof c
this.superReference(a)+".apply(this, "+h+")";if(!this.isNew){b=E.wrap(this.variable);if((e=b.properties.pop())&&b.isComplex()){g=a.scope.freeVariable("this");b="("+g+" = "+b.compile(a,k)+")"+e.compile(a)}else{b=g=b.compile(a,t);if(e)b+=e.compile(a)}return""+b+".apply("+g+", "+h+")"}e=this.idt(1);return"(function(func, args, ctor) {\n"+e+"ctor.prototype = func.prototype;\n"+e+"var child = new ctor, result = func.apply(child, args);\n"+e+'return typeof result === "object" ? result : child;\n'+this.tab+
"})("+this.variable.compile(a,k)+", "+h+", function() {})"};return f}();r.Extends=function(){ha=function(){function a(b,e){this.parent=e;this.child=b;a.__super__.constructor.call(this);return this}return a}();Z(ha,i);ha.prototype.children=["child","parent"];ha.prototype.compile=function(a){return(new f(new E(new n(ta("extends"))),[this.child,this.parent])).compile(a)};return ha}();r.Accessor=function(){A=function(){function a(b,e){this.name=b;a.__super__.constructor.call(this);this.proto=e==="prototype"?
".prototype":"";this.soakNode=e==="soak";return this}return a}();Z(A,i);A.prototype.children=["name"];A.prototype.compile=function(a){a=this.name.compile(a);return this.proto+(la.test(a)?"["+a+"]":"."+a)};A.prototype.isComplex=J;return A}();r.Index=function(){H=function(){function a(b){this.index=b;a.__super__.constructor.call(this);return this}return a}();Z(H,i);H.prototype.children=["index"];H.prototype.compile=function(a){return(this.proto?".prototype":"")+("["+this.index.compile(a,y)+"]")};H.prototype.isComplex=
function(){return this.index.isComplex()};return H}();r.ObjectLiteral=function(){ba=function(){function a(b){a.__super__.constructor.call(this);this.objects=this.properties=b||[];return this}return a}();Z(ba,i);ba.prototype.children=["properties"];ba.prototype.compileNode=function(a){var b,e,g,h,m,v,C,I,w;a.indent=this.idt(1);g=this.properties;h=[];b=0;for(e=g.length;b<e;b++){w=g[b];w instanceof L||h.push(w)}I=Y(h);b=function(){g=this.properties;h=[];m=0;for(e=g.length;m<e;m++){w=g[m];h.push(function(){C=
function(){return this.index.isComplex()};return H}();r.Obj=function(){ba=function(){function a(b){a.__super__.constructor.call(this);this.objects=this.properties=b||[];return this}return a}();Z(ba,i);ba.prototype.children=["properties"];ba.prototype.compileNode=function(a){var b,e,g,h,m,v,C,I,w;a.indent=this.idt(1);g=this.properties;h=[];b=0;for(e=g.length;b<e;b++){w=g[b];w instanceof L||h.push(w)}I=Y(h);b=function(){g=this.properties;h=[];m=0;for(e=g.length;m<e;m++){w=g[m];h.push(function(){C=
m===this.properties.length-1?"":w===I||w instanceof L?"\n":",\n";v=w instanceof L?"":this.idt(1);if(w instanceof E&&w.tags["this"])w=new l(w.properties[0].name,w,"object");else if(!(w instanceof l)&&!(w instanceof L))w=new l(w,w,"object");return v+w.compile(a)+C}.call(this))}return h}.call(this);b=b.join("");b="{"+(b?"\n"+b+"\n"+this.idt():"")+"}";return this.tags.front?"("+b+")":b};ba.prototype.assigns=function(a){var b,e,g,h;g=this.properties;b=0;for(e=g.length;b<e;b++){h=g[b];if(h.assigns(a))return true}return false};
return ba}();r.ArrayLiteral=function(){d=function(){function a(b){a.__super__.constructor.call(this);this.objects=b||[];return this}return a}();Z(d,i);d.prototype.children=["objects"];d.prototype.compileSplatLiteral=function(a){return ca.compileSplattedArray(this.objects,a)};d.prototype.compileNode=function(a){var b,e,g,h,m,v;a.indent=this.idt(1);g=this.objects;b=0;for(e=g.length;b<e;b++){m=g[b];if(m instanceof ca)return this.compileSplatLiteral(a)}v=[];e=this.objects;h=0;for(b=e.length;h<b;h++){m=
return ba}();r.Arr=function(){d=function(){function a(b){a.__super__.constructor.call(this);this.objects=b||[];return this}return a}();Z(d,i);d.prototype.children=["objects"];d.prototype.compileSplatLiteral=function(a){return ca.compileSplattedArray(this.objects,a)};d.prototype.compileNode=function(a){var b,e,g,h,m,v;a.indent=this.idt(1);g=this.objects;b=0;for(e=g.length;b<e;b++){m=g[b];if(m instanceof ca)return this.compileSplatLiteral(a)}v=[];e=this.objects;h=0;for(b=e.length;h<b;h++){m=
e[h];g=m.compile(a,k);v.push(m instanceof L?"\n"+g+"\n"+a.indent:h===this.objects.length-1?g:g+", ")}v=v.join("");return 0<v.indexOf("\n")?"[\n"+a.indent+v+"\n"+this.tab+"]":"["+v+"]"};d.prototype.assigns=function(a){var b,e,g,h;g=this.objects;b=0;for(e=g.length;b<e;b++){h=g[b];if(h.assigns(a))return true}return false};return d}();r.Class=function(){u=function(){function a(b,e,g){this.parent=e;this.variable=b;a.__super__.constructor.call(this);this.properties=g||[];this.returns=false;return this}
return a}();Z(u,i);u.prototype.children=["variable","parent","properties"];u.prototype.isStatement=j;u.prototype.makeReturn=function(){this.returns=true;return this};u.prototype.compileNode=function(a){var b,e,g,h,m,v,C,I,w,P,U,O,ja,ea;ea=this.variable||new n(a.scope.freeVariable("ctor"));w=this.parent&&new ha(ea,this.parent);O=new N;P=null;C=ea.compile(a);I=null;if(this.parent){b=new E(this.parent,[new A(new n("apply"))]);h=new F([],new N([new f(b,[new n("this"),new n("arguments")])]))}else h=new F([],
new N([new T(new n("this"))]));g=this.properties;b=0;for(e=g.length;b<e;b++){U=g[b];ja=U.variable;v=U.value;if(ja&&ja.base.value==="constructor"){if(!(v instanceof F)){h=v.cache(a);v=h[0];h=h[1];v!==h&&O.push(v);v=new f(new E(h,[new A(new n("apply"))]),[new n("this"),new n("arguments")]);v=new F([],new N([v]))}if(v.bound)throw SyntaxError("cannot define a constructor as a bound function.");v.name=C;v.body.push(new T(new n("this")));ea=new E(ea);ea.namespaced=0<C.indexOf(".");h=v;if(Y(O.expressions)instanceof

View File

@ -198,7 +198,7 @@
],
Object: [
o("{ AssignList OptComma }", function() {
return new ObjectLiteral($2);
return new Obj($2);
})
],
AssignList: [
@ -300,9 +300,9 @@
],
Array: [
o("[ ]", function() {
return new ArrayLiteral([]);
return new Arr([]);
}), o("[ ArgList OptComma ]", function() {
return new ArrayLiteral($2);
return new Arr($2);
})
],
ArgList: [

View File

@ -1,5 +1,5 @@
(function() {
var Accessor, ArrayLiteral, Assign, Base, Call, Class, Closure, Code, Comment, Existence, Expressions, Extends, For, IDENTIFIER, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, NO, NUMBER, ObjectLiteral, Op, Param, Parens, Push, Return, SIMPLENUM, Scope, Splat, Switch, TAB, THIS, TRAILING_WHITESPACE, Throw, Try, UTILITIES, Value, While, YES, _ref, compact, del, ends, extend, flatten, last, merge, multident, starts, utility;
var Accessor, Arr, Assign, Base, Call, Class, Closure, Code, Comment, Existence, Expressions, Extends, For, IDENTIFIER, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, NO, NUMBER, Obj, Op, Param, Parens, Push, Return, SIMPLENUM, Scope, Splat, Switch, TAB, THIS, TRAILING_WHITESPACE, Throw, Try, UTILITIES, Value, While, YES, _ref, compact, del, ends, extend, flatten, last, merge, multident, starts, utility;
var __extends = function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
@ -336,10 +336,10 @@
return !!this.properties.length;
};
Value.prototype.isArray = function() {
return this.base instanceof ArrayLiteral && !this.properties.length;
return this.base instanceof Arr && !this.properties.length;
};
Value.prototype.isObject = function() {
return this.base instanceof ObjectLiteral && !this.properties.length;
return this.base instanceof Obj && !this.properties.length;
};
Value.prototype.isComplex = function() {
return this.base.isComplex() || this.hasProperties();
@ -643,18 +643,18 @@
};
return Index;
})();
exports.ObjectLiteral = (function() {
ObjectLiteral = (function() {
function ObjectLiteral(props) {
ObjectLiteral.__super__.constructor.call(this);
exports.Obj = (function() {
Obj = (function() {
function Obj(props) {
Obj.__super__.constructor.call(this);
this.objects = this.properties = props || [];
return this;
};
return ObjectLiteral;
return Obj;
})();
__extends(ObjectLiteral, Base);
ObjectLiteral.prototype.children = ['properties'];
ObjectLiteral.prototype.compileNode = function(o) {
__extends(Obj, Base);
Obj.prototype.children = ['properties'];
Obj.prototype.compileNode = function(o) {
var _i, _len, _len2, _ref2, _ref3, _result, i, indent, join, lastNoncom, nonComments, obj, prop, props;
_ref2 = this.properties;
for (i = 0, _len = _ref2.length; i < _len; i++) {
@ -696,10 +696,10 @@
obj = "{" + (props ? '\n' + props + '\n' + this.idt() : '') + "}";
return this.tags.front ? "(" + obj + ")" : obj;
};
ObjectLiteral.prototype.compileDynamic = function(o, idx) {
Obj.prototype.compileDynamic = function(o, idx) {
var _len, _ref2, _ref3, code, i, key, obj, prop, ref, sub;
obj = o.scope.freeVariable('obj');
code = "" + obj + " = " + (new ObjectLiteral(this.properties.slice(0, idx)).compile(o)) + ", ";
code = "" + obj + " = " + (new Obj(this.properties.slice(0, idx)).compile(o)) + ", ";
_ref2 = this.properties.slice(idx);
for (i = 0, _len = _ref2.length; i < _len; i++) {
prop = _ref2[i];
@ -718,7 +718,7 @@
code += obj;
return o.level <= LEVEL_PAREN ? code : "(" + code + ")";
};
ObjectLiteral.prototype.assigns = function(name) {
Obj.prototype.assigns = function(name) {
var _i, _len, _ref2, prop;
_ref2 = this.properties;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
@ -729,23 +729,23 @@
}
return false;
};
return ObjectLiteral;
return Obj;
})();
exports.ArrayLiteral = (function() {
ArrayLiteral = (function() {
function ArrayLiteral(objs) {
ArrayLiteral.__super__.constructor.call(this);
exports.Arr = (function() {
Arr = (function() {
function Arr(objs) {
Arr.__super__.constructor.call(this);
this.objects = objs || [];
return this;
};
return ArrayLiteral;
return Arr;
})();
__extends(ArrayLiteral, Base);
ArrayLiteral.prototype.children = ['objects'];
ArrayLiteral.prototype.compileSplatLiteral = function(o) {
__extends(Arr, Base);
Arr.prototype.children = ['objects'];
Arr.prototype.compileSplatLiteral = function(o) {
return Splat.compileSplattedArray(this.objects, o);
};
ArrayLiteral.prototype.compileNode = function(o) {
Arr.prototype.compileNode = function(o) {
var _i, _len, _len2, _ref2, _ref3, code, i, obj, objects;
o.indent = this.idt(1);
_ref2 = this.objects;
@ -765,7 +765,7 @@
objects = objects.join('');
return 0 < objects.indexOf('\n') ? "[\n" + o.indent + objects + "\n" + this.tab + "]" : "[" + objects + "]";
};
ArrayLiteral.prototype.assigns = function(name) {
Arr.prototype.assigns = function(name) {
var _i, _len, _ref2, obj;
_ref2 = this.objects;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
@ -776,7 +776,7 @@
}
return false;
};
return ArrayLiteral;
return Arr;
})();
exports.Class = (function() {
Class = (function() {

View File

@ -187,7 +187,7 @@ case 87:this.$ = yy.extend($$[$0-2+2-1], {
proto: true
});
break;
case 88:this.$ = new yy.ObjectLiteral($$[$0-4+2-1]);
case 88:this.$ = new yy.Obj($$[$0-4+2-1]);
break;
case 89:this.$ = [];
break;
@ -253,9 +253,9 @@ case 119:this.$ = new yy.Value(new yy.Literal('this'));
break;
case 120:this.$ = new yy.Value(new yy.Literal('this'), [new yy.Accessor($$[$0-2+2-1])], 'this');
break;
case 121:this.$ = new yy.ArrayLiteral([]);
case 121:this.$ = new yy.Arr([]);
break;
case 122:this.$ = new yy.ArrayLiteral($$[$0-4+2-1]);
case 122:this.$ = new yy.Arr($$[$0-4+2-1]);
break;
case 123:this.$ = [$$[$0-1+1-1]];
break;

View File

@ -264,7 +264,7 @@ grammar =
# In CoffeeScript, an object literal is simply a list of assignments.
Object: [
o "{ AssignList OptComma }", -> new ObjectLiteral $2
o "{ AssignList OptComma }", -> new Obj $2
]
# Assignment of properties within an object literal can be separated by
@ -347,8 +347,8 @@ grammar =
# The array literal.
Array: [
o "[ ]", -> new ArrayLiteral []
o "[ ArgList OptComma ]", -> new ArrayLiteral $2
o "[ ]", -> new Arr []
o "[ ArgList OptComma ]", -> new Arr $2
]
# The **ArgList** is both the list of objects passed into a function call,

View File

@ -316,10 +316,10 @@ exports.Value = class Value extends Base
# Some boolean checks for the benefit of other nodes.
isArray: ->
@base instanceof ArrayLiteral and not @properties.length
@base instanceof Arr and not @properties.length
isObject: ->
@base instanceof ObjectLiteral and not @properties.length
@base instanceof Obj and not @properties.length
isComplex: ->
@base.isComplex() or @hasProperties()
@ -564,10 +564,10 @@ exports.Index = class Index extends Base
isComplex: -> @index.isComplex()
#### ObjectLiteral
#### Obj
# An object literal, nothing fancy.
exports.ObjectLiteral = class ObjectLiteral extends Base
exports.Obj = class Obj extends Base
children: ['properties']
@ -600,7 +600,7 @@ exports.ObjectLiteral = class ObjectLiteral extends Base
compileDynamic: (o, idx) ->
obj = o.scope.freeVariable 'obj'
code = "#{obj} = #{ new ObjectLiteral(@properties.slice 0, idx).compile o }, "
code = "#{obj} = #{ new Obj(@properties.slice 0, idx).compile o }, "
for prop, i in @properties.slice idx
if prop instanceof Assign
key = prop.variable.compile o, LEVEL_PAREN
@ -618,10 +618,10 @@ exports.ObjectLiteral = class ObjectLiteral extends Base
for prop in @properties when prop.assigns name then return yes
no
#### ArrayLiteral
#### Arr
# An array literal.
exports.ArrayLiteral = class ArrayLiteral extends Base
exports.Arr = class Arr extends Base
children: ['objects']