mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
fixing doubled semis
This commit is contained in:
@@ -512,6 +512,7 @@
|
|||||||
};
|
};
|
||||||
__extends(CurryNode, CallNode);
|
__extends(CurryNode, CallNode);
|
||||||
CurryNode.prototype.type = 'Curry';
|
CurryNode.prototype.type = 'Curry';
|
||||||
|
CurryNode.prototype.body = 'func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)))';
|
||||||
CurryNode.prototype.arguments = function arguments(o) {
|
CurryNode.prototype.arguments = function arguments(o) {
|
||||||
var _a, _b, _c, arg;
|
var _a, _b, _c, arg;
|
||||||
_a = this.args;
|
_a = this.args;
|
||||||
@@ -525,7 +526,7 @@
|
|||||||
};
|
};
|
||||||
CurryNode.prototype.compile_node = function compile_node(o) {
|
CurryNode.prototype.compile_node = function compile_node(o) {
|
||||||
var body, curried, curry;
|
var body, curried, curry;
|
||||||
body = Expressions.wrap([literal('func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));')]);
|
body = Expressions.wrap([literal(this.body)]);
|
||||||
curried = new CodeNode([], body);
|
curried = new CodeNode([], body);
|
||||||
curry = new CodeNode([literal('func'), literal('obj'), literal('args')], Expressions.wrap([curried]));
|
curry = new CodeNode([literal('func'), literal('obj'), literal('args')], Expressions.wrap([curried]));
|
||||||
return (new ParentheticalNode(new CallNode(curry, [this.meth, this.context, literal(this.arguments(o))]))).compile(o);
|
return (new ParentheticalNode(new CallNode(curry, [this.meth, this.context, literal(this.arguments(o))]))).compile(o);
|
||||||
|
|||||||
@@ -394,6 +394,8 @@ exports.CallNode: class CallNode extends BaseNode
|
|||||||
exports.CurryNode: class CurryNode extends CallNode
|
exports.CurryNode: class CurryNode extends CallNode
|
||||||
type: 'Curry'
|
type: 'Curry'
|
||||||
|
|
||||||
|
body: 'func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)))'
|
||||||
|
|
||||||
constructor: (meth, args) ->
|
constructor: (meth, args) ->
|
||||||
@children: flatten [@meth: meth, @context: args[0], @args: (args.slice(1) or [])]
|
@children: flatten [@meth: meth, @context: args[0], @args: (args.slice(1) or [])]
|
||||||
|
|
||||||
@@ -403,7 +405,7 @@ exports.CurryNode: class CurryNode extends CallNode
|
|||||||
(new ArrayNode(@args)).compile o
|
(new ArrayNode(@args)).compile o
|
||||||
|
|
||||||
compile_node: (o) ->
|
compile_node: (o) ->
|
||||||
body: Expressions.wrap([literal('func.apply(obj, args.concat(Array.prototype.slice.call(arguments, 0)));')])
|
body: Expressions.wrap([literal @body])
|
||||||
curried: new CodeNode([], body)
|
curried: new CodeNode([], body)
|
||||||
curry: new CodeNode([literal('func'), literal('obj'), literal('args')], Expressions.wrap([curried]))
|
curry: new CodeNode([literal('func'), literal('obj'), literal('args')], Expressions.wrap([curried]))
|
||||||
(new ParentheticalNode(new CallNode(curry, [@meth, @context, literal(@arguments(o))]))).compile o
|
(new ParentheticalNode(new CallNode(curry, [@meth, @context, literal(@arguments(o))]))).compile o
|
||||||
|
|||||||
Reference in New Issue
Block a user