diff --git a/lib/coffee-script/browser.js b/lib/coffee-script/browser.js index a7f24a61ad..e6a6b5c495 100644 --- a/lib/coffee-script/browser.js +++ b/lib/coffee-script/browser.js @@ -72,4 +72,5 @@ } else { attachEvent('onload', runScripts); } + }).call(this); diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js index 4def2f5dfc..986d5cc66b 100644 --- a/lib/coffee-script/cake.js +++ b/lib/coffee-script/cake.js @@ -95,4 +95,5 @@ if (parent !== dir) return cakefileDirectory(parent); throw new Error("Cakefile not found in " + (process.cwd())); }; + }).call(this); diff --git a/lib/coffee-script/coffee-script.js b/lib/coffee-script/coffee-script.js index ae44304fe7..3a984d651f 100644 --- a/lib/coffee-script/coffee-script.js +++ b/lib/coffee-script/coffee-script.js @@ -146,4 +146,5 @@ }; parser.yy = require('./nodes'); + }).call(this); diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js index 847bb32058..199754ee90 100644 --- a/lib/coffee-script/command.js +++ b/lib/coffee-script/command.js @@ -316,4 +316,5 @@ version = function() { return printLine("CoffeeScript version " + CoffeeScript.VERSION); }; + }).call(this); diff --git a/lib/coffee-script/grammar.js b/lib/coffee-script/grammar.js index 8f5e68fbab..b5bae43aca 100644 --- a/lib/coffee-script/grammar.js +++ b/lib/coffee-script/grammar.js @@ -586,4 +586,5 @@ operators: operators.reverse(), startSymbol: 'Root' }); + }).call(this); diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js index 5907ae0a46..038f781069 100644 --- a/lib/coffee-script/helpers.js +++ b/lib/coffee-script/helpers.js @@ -68,4 +68,5 @@ exports.last = function(array, back) { return array[array.length - (back || 0) - 1]; }; + }).call(this); diff --git a/lib/coffee-script/index.js b/lib/coffee-script/index.js index bef3b6418f..5e6eba94a4 100644 --- a/lib/coffee-script/index.js +++ b/lib/coffee-script/index.js @@ -6,4 +6,5 @@ val = _ref[key]; exports[key] = val; } + }).call(this); diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js index 862df831ee..416d747e6f 100644 --- a/lib/coffee-script/lexer.js +++ b/lib/coffee-script/lexer.js @@ -586,6 +586,7 @@ }; return Lexer; + })(); JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; @@ -682,4 +683,5 @@ INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL'); LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; + }).call(this); diff --git a/lib/coffee-script/nodes.js b/lib/coffee-script/nodes.js index 388cf4153d..01cc83fd31 100644 --- a/lib/coffee-script/nodes.js +++ b/lib/coffee-script/nodes.js @@ -184,6 +184,7 @@ Base.prototype.assigns = NO; return Base; + })(); exports.Block = Block = (function() { @@ -288,7 +289,7 @@ } if (top) { if (this.spaced) { - return '\n' + codes.join('\n\n'); + return "\n" + (codes.join('\n\n')) + "\n"; } else { return codes.join('\n'); } @@ -382,6 +383,7 @@ }; return Block; + })(); exports.Literal = Literal = (function() { @@ -437,6 +439,7 @@ }; return Literal; + })(); exports.Return = Return = (function() { @@ -470,6 +473,7 @@ }; return Return; + })(); exports.Value = Value = (function() { @@ -617,6 +621,7 @@ }; return Value; + })(); exports.Comment = Comment = (function() { @@ -639,6 +644,7 @@ }; return Comment; + })(); exports.Call = Call = (function() { @@ -807,6 +813,7 @@ }; return Call; + })(); exports.Extends = Extends = (function() { @@ -825,6 +832,7 @@ }; return Extends; + })(); exports.Access = Access = (function() { @@ -852,6 +860,7 @@ Access.prototype.isComplex = NO; return Access; + })(); exports.Index = Index = (function() { @@ -873,6 +882,7 @@ }; return Index; + })(); exports.Range = Range = (function() { @@ -951,6 +961,7 @@ }; return Range; + })(); exports.Slice = Slice = (function() { @@ -976,6 +987,7 @@ }; return Slice; + })(); exports.Obj = Obj = (function() { @@ -1041,6 +1053,7 @@ }; return Obj; + })(); exports.Arr = Arr = (function() { @@ -1088,6 +1101,7 @@ }; return Arr; + })(); exports.Class = Class = (function() { @@ -1236,6 +1250,7 @@ }; return Class; + })(); exports.Assign = Assign = (function() { @@ -1433,6 +1448,7 @@ }; return Assign; + })(); exports.Code = Code = (function() { @@ -1544,6 +1560,7 @@ }; return Code; + })(); exports.Param = Param = (function() { @@ -1582,6 +1599,7 @@ }; return Param; + })(); exports.Splat = Splat = (function() { @@ -1647,6 +1665,7 @@ }; return Splat; + })(); exports.While = While = (function() { @@ -1718,6 +1737,7 @@ }; return While; + })(); exports.Op = Op = (function() { @@ -1869,6 +1889,7 @@ }; return Op; + })(); exports.In = In = (function() { @@ -1940,6 +1961,7 @@ }; return In; + })(); exports.Try = Try = (function() { @@ -1979,6 +2001,7 @@ }; return Try; + })(); exports.Throw = Throw = (function() { @@ -2002,6 +2025,7 @@ }; return Throw; + })(); exports.Existence = Existence = (function() { @@ -2034,6 +2058,7 @@ }; return Existence; + })(); exports.Parens = Parens = (function() { @@ -2071,6 +2096,7 @@ }; return Parens; + })(); exports.For = For = (function() { @@ -2203,6 +2229,7 @@ }; return For; + })(); exports.Switch = Switch = (function() { @@ -2277,6 +2304,7 @@ }; return Switch; + })(); exports.If = If = (function() { @@ -2390,6 +2418,7 @@ }; return If; + })(); Closure = { @@ -2481,4 +2510,5 @@ code = code.replace(/\n/g, '$&' + tab); return code.replace(/\s+$/, ''); }; + }).call(this); diff --git a/lib/coffee-script/optparse.js b/lib/coffee-script/optparse.js index 6afd4e219f..5e0114c93e 100644 --- a/lib/coffee-script/optparse.js +++ b/lib/coffee-script/optparse.js @@ -63,6 +63,7 @@ }; return OptionParser; + })(); LONG_FLAG = /^(--\w[\w\-]+)/; @@ -117,4 +118,5 @@ } return result; }; + }).call(this); diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js index fea668e1f1..3368d7c616 100644 --- a/lib/coffee-script/repl.js +++ b/lib/coffee-script/repl.js @@ -145,4 +145,5 @@ repl.setPrompt(REPL_PROMPT); repl.prompt(); + }).call(this); diff --git a/lib/coffee-script/rewriter.js b/lib/coffee-script/rewriter.js index b5bcaca18c..549d5eff32 100644 --- a/lib/coffee-script/rewriter.js +++ b/lib/coffee-script/rewriter.js @@ -252,6 +252,7 @@ }; return Rewriter; + })(); BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; @@ -285,4 +286,5 @@ SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; + }).call(this); diff --git a/lib/coffee-script/scope.js b/lib/coffee-script/scope.js index 21c56a2dd7..a9aa80729d 100644 --- a/lib/coffee-script/scope.js +++ b/lib/coffee-script/scope.js @@ -117,5 +117,7 @@ }; return Scope; + })(); + }).call(this); diff --git a/src/nodes.coffee b/src/nodes.coffee index 59ed81b00b..b3c91093fa 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -232,7 +232,7 @@ exports.Block = class Block extends Base codes.push node.compile o, LEVEL_LIST if top if @spaced - return '\n' + codes.join('\n\n') + return "\n#{codes.join '\n\n'}\n" else return codes.join '\n' code = codes.join(', ') or 'void 0'