1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

merging in matehat's nice refactor to splats (in arrays and otherwise)

This commit is contained in:
Jeremy Ashkenas 2010-03-19 22:41:23 -04:00
parent fe04f8ce6b
commit 92688c89ef

View file

@ -421,7 +421,7 @@
this.children = flatten([(this.variable = variable), (this.args = (args || []))]);
this.compile_splat_arguments = (function(func, obj, args) {
return (function() {
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));;
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));
});
}(SplatNode.compile_mixed_array, this, [this.args]));
this.prefix = '';
@ -488,7 +488,7 @@
this.children = flatten([(this.meth = meth), (this.context = args[0]), (this.args = (args.slice(1) || []))]);
this.compile_splat_arguments = (function(func, obj, args) {
return (function() {
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));;
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));
});
}(SplatNode.compile_mixed_array, this, [this.args]));
return this;
@ -710,7 +710,7 @@
this.children = (this.objects = objects || []);
this.compile_splat_literal = (function(func, obj, args) {
return (function() {
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));;
return func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));
});
}(SplatNode.compile_mixed_array, this, [this.objects]));
return this;