mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
765: -b/--bare <- --no-wrap
This commit is contained in:
13
lib/nodes.js
13
lib/nodes.js
@@ -205,16 +205,15 @@
|
||||
_result.push(this.compileExpression(node, merge(o)));
|
||||
}
|
||||
return _result;
|
||||
}).call(this).join("\n");
|
||||
}).call(this).join('\n');
|
||||
};
|
||||
Expressions.prototype.compileRoot = function(o) {
|
||||
var code, wrap;
|
||||
wrap = (o.wrap != null) ? o.wrap : true;
|
||||
o.indent = (this.tab = wrap ? TAB : '');
|
||||
var code;
|
||||
o.indent = (this.tab = o.bare ? '' : TAB);
|
||||
o.scope = new Scope(null, this, null);
|
||||
code = this.compileWithDeclarations(o);
|
||||
code = code.replace(TRAILING_WHITESPACE, '');
|
||||
return wrap ? ("(function() {\n" + code + "\n}).call(this);\n") : code;
|
||||
return o.bare ? code : ("(function() {\n" + code + "\n}).call(this);\n");
|
||||
};
|
||||
Expressions.prototype.compileWithDeclarations = function(o) {
|
||||
var code;
|
||||
@@ -1138,8 +1137,8 @@
|
||||
o.top = true;
|
||||
o.indent = this.idt(1);
|
||||
empty = this.body.expressions.length === 0;
|
||||
del(o, 'wrap');
|
||||
del(o, 'globals');
|
||||
delete o.bare;
|
||||
delete o.globals;
|
||||
splat = undefined;
|
||||
params = [];
|
||||
for (i = 0, _len = (_ref2 = this.params).length; i < _len; i++) {
|
||||
|
||||
Reference in New Issue
Block a user