mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
noWrap: true -> wrap: false
This commit is contained in:
committed by
Jeremy Ashkenas
parent
f6ca5d814c
commit
6e6165796c
@@ -204,12 +204,13 @@
|
||||
}).call(this).join("\n");
|
||||
};
|
||||
Expressions.prototype.compileRoot = function(o) {
|
||||
var code;
|
||||
o.indent = (this.tab = o.noWrap ? '' : TAB);
|
||||
var code, wrap;
|
||||
wrap = (o.wrap != null) ? o.wrap : true;
|
||||
o.indent = (this.tab = wrap ? TAB : '');
|
||||
o.scope = new Scope(null, this, null);
|
||||
code = this.compileWithDeclarations(o);
|
||||
code = code.replace(TRAILING_WHITESPACE, '');
|
||||
return o.noWrap ? code : ("(function() {\n" + code + "\n}).call(this);\n");
|
||||
return wrap ? ("(function() {\n" + code + "\n}).call(this);\n") : code;
|
||||
};
|
||||
Expressions.prototype.compileWithDeclarations = function(o) {
|
||||
var code;
|
||||
@@ -1103,7 +1104,7 @@
|
||||
o.top = true;
|
||||
o.indent = this.idt(1);
|
||||
empty = this.body.expressions.length === 0;
|
||||
del(o, 'noWrap');
|
||||
del(o, 'wrap');
|
||||
del(o, 'globals');
|
||||
splat = undefined;
|
||||
params = [];
|
||||
|
||||
Reference in New Issue
Block a user