mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
merging in matehat's nice refactor to splats (in arrays and otherwise)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user