From 63ab886e9f0dd51aed74663a7fe434fbea201812 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sat, 10 Dec 2011 21:19:59 -0500 Subject: [PATCH] removed excessive spacing --- lib/coffee-script/browser.js | 1 - lib/coffee-script/cake.js | 1 - lib/coffee-script/coffee-script.js | 1 - lib/coffee-script/command.js | 1 - lib/coffee-script/grammar.js | 1 - lib/coffee-script/helpers.js | 1 - lib/coffee-script/index.js | 1 - lib/coffee-script/lexer.js | 2 -- lib/coffee-script/nodes.js | 32 +----------------------------- lib/coffee-script/optparse.js | 2 -- lib/coffee-script/repl.js | 1 - lib/coffee-script/rewriter.js | 2 -- lib/coffee-script/scope.js | 2 -- src/nodes.coffee | 2 +- 14 files changed, 2 insertions(+), 48 deletions(-) diff --git a/lib/coffee-script/browser.js b/lib/coffee-script/browser.js index e6a6b5c4..a7f24a61 100644 --- a/lib/coffee-script/browser.js +++ b/lib/coffee-script/browser.js @@ -72,5 +72,4 @@ } else { attachEvent('onload', runScripts); } - }).call(this); diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js index 986d5cc6..4def2f5d 100644 --- a/lib/coffee-script/cake.js +++ b/lib/coffee-script/cake.js @@ -95,5 +95,4 @@ 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 3a984d65..ae44304f 100644 --- a/lib/coffee-script/coffee-script.js +++ b/lib/coffee-script/coffee-script.js @@ -146,5 +146,4 @@ }; parser.yy = require('./nodes'); - }).call(this); diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js index 199754ee..847bb320 100644 --- a/lib/coffee-script/command.js +++ b/lib/coffee-script/command.js @@ -316,5 +316,4 @@ 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 b5bae43a..8f5e68fb 100644 --- a/lib/coffee-script/grammar.js +++ b/lib/coffee-script/grammar.js @@ -586,5 +586,4 @@ operators: operators.reverse(), startSymbol: 'Root' }); - }).call(this); diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js index 038f7810..5907ae0a 100644 --- a/lib/coffee-script/helpers.js +++ b/lib/coffee-script/helpers.js @@ -68,5 +68,4 @@ 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 5e6eba94..bef3b641 100644 --- a/lib/coffee-script/index.js +++ b/lib/coffee-script/index.js @@ -6,5 +6,4 @@ val = _ref[key]; exports[key] = val; } - }).call(this); diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js index 416d747e..862df831 100644 --- a/lib/coffee-script/lexer.js +++ b/lib/coffee-script/lexer.js @@ -586,7 +586,6 @@ }; 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']; @@ -683,5 +682,4 @@ 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 ad5baa9c..9d94f153 100644 --- a/lib/coffee-script/nodes.js +++ b/lib/coffee-script/nodes.js @@ -184,7 +184,6 @@ Base.prototype.assigns = NO; return Base; - })(); exports.Block = Block = (function() { @@ -289,7 +288,7 @@ } if (top) { if (this.spaced) { - return '\n' + codes.join('\n\n') + '\n'; + return '\n' + codes.join('\n\n'); } else { return codes.join('\n'); } @@ -356,7 +355,6 @@ }; return Block; - })(); exports.Literal = Literal = (function() { @@ -412,7 +410,6 @@ }; return Literal; - })(); exports.Return = Return = (function() { @@ -446,7 +443,6 @@ }; return Return; - })(); exports.Value = Value = (function() { @@ -594,7 +590,6 @@ }; return Value; - })(); exports.Comment = Comment = (function() { @@ -617,7 +612,6 @@ }; return Comment; - })(); exports.Call = Call = (function() { @@ -786,7 +780,6 @@ }; return Call; - })(); exports.Extends = Extends = (function() { @@ -805,7 +798,6 @@ }; return Extends; - })(); exports.Access = Access = (function() { @@ -833,7 +825,6 @@ Access.prototype.isComplex = NO; return Access; - })(); exports.Index = Index = (function() { @@ -855,7 +846,6 @@ }; return Index; - })(); exports.Range = Range = (function() { @@ -934,7 +924,6 @@ }; return Range; - })(); exports.Slice = Slice = (function() { @@ -960,7 +949,6 @@ }; return Slice; - })(); exports.Obj = Obj = (function() { @@ -1026,7 +1014,6 @@ }; return Obj; - })(); exports.Arr = Arr = (function() { @@ -1074,7 +1061,6 @@ }; return Arr; - })(); exports.Class = Class = (function() { @@ -1223,7 +1209,6 @@ }; return Class; - })(); exports.Assign = Assign = (function() { @@ -1421,7 +1406,6 @@ }; return Assign; - })(); exports.Code = Code = (function() { @@ -1533,7 +1517,6 @@ }; return Code; - })(); exports.Param = Param = (function() { @@ -1572,7 +1555,6 @@ }; return Param; - })(); exports.Splat = Splat = (function() { @@ -1638,7 +1620,6 @@ }; return Splat; - })(); exports.While = While = (function() { @@ -1710,7 +1691,6 @@ }; return While; - })(); exports.Op = Op = (function() { @@ -1862,7 +1842,6 @@ }; return Op; - })(); exports.In = In = (function() { @@ -1934,7 +1913,6 @@ }; return In; - })(); exports.Try = Try = (function() { @@ -1974,7 +1952,6 @@ }; return Try; - })(); exports.Throw = Throw = (function() { @@ -1998,7 +1975,6 @@ }; return Throw; - })(); exports.Existence = Existence = (function() { @@ -2031,7 +2007,6 @@ }; return Existence; - })(); exports.Parens = Parens = (function() { @@ -2069,7 +2044,6 @@ }; return Parens; - })(); exports.For = For = (function() { @@ -2202,7 +2176,6 @@ }; return For; - })(); exports.Switch = Switch = (function() { @@ -2277,7 +2250,6 @@ }; return Switch; - })(); exports.If = If = (function() { @@ -2391,7 +2363,6 @@ }; return If; - })(); Closure = { @@ -2483,5 +2454,4 @@ 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 5e0114c9..6afd4e21 100644 --- a/lib/coffee-script/optparse.js +++ b/lib/coffee-script/optparse.js @@ -63,7 +63,6 @@ }; return OptionParser; - })(); LONG_FLAG = /^(--\w[\w\-]+)/; @@ -118,5 +117,4 @@ } return result; }; - }).call(this); diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js index 3368d7c6..fea668e1 100644 --- a/lib/coffee-script/repl.js +++ b/lib/coffee-script/repl.js @@ -145,5 +145,4 @@ repl.setPrompt(REPL_PROMPT); repl.prompt(); - }).call(this); diff --git a/lib/coffee-script/rewriter.js b/lib/coffee-script/rewriter.js index 549d5eff..b5bcaca1 100644 --- a/lib/coffee-script/rewriter.js +++ b/lib/coffee-script/rewriter.js @@ -252,7 +252,6 @@ }; return Rewriter; - })(); BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; @@ -286,5 +285,4 @@ 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 a9aa8072..21c56a2d 100644 --- a/lib/coffee-script/scope.js +++ b/lib/coffee-script/scope.js @@ -117,7 +117,5 @@ }; return Scope; - })(); - }).call(this); diff --git a/src/nodes.coffee b/src/nodes.coffee index b9039b10..e1e1eab9 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') + '\n' + return '\n' + codes.join('\n\n') else return codes.join '\n' code = codes.join(', ') or 'void 0'