coffee-script-redux
Advanced tools
Comparing version 2.0.0-beta7 to 2.0.0-beta8
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var CoffeeScript, runScripts; | ||
@@ -47,6 +47,5 @@ module.exports = CoffeeScript = require('./module'); | ||
runScripts = function () { | ||
var coffees, execute, index, scripts; | ||
var coffees, execute, index, s, scripts; | ||
scripts = document.getElementsByTagName('script'); | ||
coffees = function (accum$) { | ||
var s; | ||
for (var i$ = 0, length$ = scripts.length; i$ < length$; ++i$) { | ||
@@ -53,0 +52,0 @@ s = scripts[i$]; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var $0, $0, additionalArgs, CoffeeScript, concat, cscodegen, escodegen, esmangle, foldl, fs, humanReadable, input, input, inputName, inputSource, inspect, knownOpts, nopt, numberLines, optAliases, Optimiser, option, options, output, parameter, path, pkg, positionalArgs, Preprocessor, processInput, Repl, runMain; | ||
@@ -27,3 +27,3 @@ fs = require('fs'); | ||
return require('escodegen'); | ||
} catch (e$) { | ||
} catch (e$1) { | ||
return; | ||
@@ -35,3 +35,3 @@ } | ||
return require('esmangle'); | ||
} catch (e$) { | ||
} catch (e$2) { | ||
return; | ||
@@ -160,3 +160,3 @@ } | ||
processInput = function (err) { | ||
var cache$3, e, js, jsAST, preprocessed, result, sourceMap; | ||
var cache$3, e, js, jsAST, preprocessed, result, sourceMap, sourceMappingUrl; | ||
if (null != err) | ||
@@ -173,3 +173,3 @@ throw err; | ||
console.error(numberLines(humanReadable(preprocessed))); | ||
} catch (e$) { | ||
} catch (e$3) { | ||
} | ||
@@ -183,4 +183,4 @@ try { | ||
}); | ||
} catch (e$1) { | ||
e = e$1; | ||
} catch (e$4) { | ||
e = e$4; | ||
console.error(e.message); | ||
@@ -209,4 +209,4 @@ process.exit(1); | ||
result = cscodegen.generate(result); | ||
} catch (e$2) { | ||
e = e$2; | ||
} catch (e$5) { | ||
e = e$5; | ||
console.error(e.stack || e.message); | ||
@@ -237,4 +237,4 @@ process.exit(1); | ||
jsAST = esmangle.mangle(esmangle.optimize(jsAST), { destructive: true }); | ||
} catch (e$3) { | ||
e = e$3; | ||
} catch (e$6) { | ||
e = e$6; | ||
console.error(e.stack || e.message); | ||
@@ -246,4 +246,4 @@ process.exit(1); | ||
sourceMap = CoffeeScript.sourceMap(jsAST, inputName, { compact: options.minify }); | ||
} catch (e$4) { | ||
e = e$4; | ||
} catch (e$7) { | ||
e = e$7; | ||
console.error(e.stack || e.message); | ||
@@ -264,4 +264,4 @@ process.exit(1); | ||
cache$3; | ||
} catch (e$5) { | ||
e = e$5; | ||
} catch (e$8) { | ||
e = e$8; | ||
console.error(e.stack || e.message); | ||
@@ -273,3 +273,4 @@ process.exit(1); | ||
fs.writeFileSync(options.sourceMapFile, '' + sourceMap); | ||
js = '' + js + '\n\n//# sourceMappingURL=' + options.sourceMapFile + ''; | ||
sourceMappingUrl = options.output ? path.relative(path.dirname(options.output), options.sourceMapFile) : options.sourceMapFile; | ||
js = '' + js + '\n\n//# sourceMappingURL=' + sourceMappingUrl + ''; | ||
} | ||
@@ -281,3 +282,6 @@ output(js); | ||
CoffeeScript.register(); | ||
process.argv = ['coffee'].concat([].slice.call(process.argv, 2)); | ||
process.argv = [ | ||
process.argv[1], | ||
options.input | ||
].concat(additionalArgs); | ||
runMain(input, js, jsAST, inputSource); | ||
@@ -284,0 +288,0 @@ return; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var concat, foldl, map, nub, span; | ||
@@ -33,4 +33,4 @@ this.any = function (list, fn) { | ||
this.map = map = function (list, fn) { | ||
var e; | ||
return function (accum$) { | ||
var e; | ||
for (var i$ = 0, length$ = list.length; i$ < length$; ++i$) { | ||
@@ -45,3 +45,3 @@ e = list[i$]; | ||
var cache$; | ||
return (cache$ = []).concat.apply(cache$, [].slice.call(list).concat()); | ||
return (cache$ = []).concat.apply(cache$, [].slice.call(list)); | ||
}; | ||
@@ -52,4 +52,4 @@ this.concatMap = function (list, fn) { | ||
this.intersect = function (listA, listB) { | ||
var a; | ||
return function (accum$) { | ||
var a; | ||
for (var i$ = 0, length$ = listA.length; i$ < length$; ++i$) { | ||
@@ -65,4 +65,4 @@ a = listA[i$]; | ||
this.difference = function (listA, listB) { | ||
var a; | ||
return function (accum$) { | ||
var a; | ||
for (var i$ = 0, length$ = listA.length; i$ < length$; ++i$) { | ||
@@ -89,4 +89,4 @@ a = listA[i$]; | ||
this.union = function (listA, listB) { | ||
var b; | ||
return listA.concat(function (accum$) { | ||
var b; | ||
for (var cache$ = nub(listB), i$ = 0, length$ = cache$.length; i$ < length$; ++i$) { | ||
@@ -93,0 +93,0 @@ b = cache$[i$]; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var beingDeclared, cleanMarkers, concat, concatMap, CS, difference, envEnrichments, envEnrichments_, foldl, humanReadable, map, nub, numberLines, pointToErrorLocation, usedAsExpression, usedAsExpression_; | ||
@@ -12,3 +12,3 @@ cache$ = require('./functional-helpers'); | ||
this.numberLines = numberLines = function (input, startLine) { | ||
var lines, numbered, padSize; | ||
var currLine, i, line, lines, numbered, pad, padSize; | ||
if (null == startLine) | ||
@@ -19,3 +19,2 @@ startLine = 1; | ||
numbered = function (accum$) { | ||
var currLine, i, line, pad; | ||
for (var i$ = 0, length$ = lines.length; i$ < length$; ++i$) { | ||
@@ -121,32 +120,34 @@ line = lines[i$]; | ||
inScope = []; | ||
possibilities = function () { | ||
possibilities = nub(function () { | ||
switch (false) { | ||
case !this['instanceof'](CS.AssignOp): | ||
return nub(beingDeclared(this.assignee)); | ||
return concat([ | ||
beingDeclared(this.assignee), | ||
envEnrichments(this.expression) | ||
]); | ||
case !this['instanceof'](CS.Class): | ||
return nub(concat([ | ||
return concat([ | ||
beingDeclared(this.nameAssignee), | ||
envEnrichments(this.parent), | ||
'undefined' !== typeof name && null != name ? [name] : [] | ||
])); | ||
envEnrichments(this.parent) | ||
]); | ||
case !this['instanceof'](CS.ForIn, CS.ForOf): | ||
return nub(concat([ | ||
concatMap(this.childNodes, function (this$) { | ||
return function (child) { | ||
if (in$(child, this$.listMembers)) { | ||
return concatMap(this$[child], function (m) { | ||
return envEnrichments(m, inScope); | ||
}); | ||
} else { | ||
return envEnrichments(this$[child], inScope); | ||
} | ||
}; | ||
}(this)), | ||
return concat([ | ||
beingDeclared(this.keyAssignee), | ||
beingDeclared(this.valAssignee) | ||
])); | ||
beingDeclared(this.valAssignee), | ||
envEnrichments(this.target), | ||
envEnrichments(this.step), | ||
envEnrichments(this.filter), | ||
envEnrichments(this.body) | ||
]); | ||
case !this['instanceof'](CS.Try): | ||
return concat([ | ||
beingDeclared(this.catchAssignee), | ||
envEnrichments(this.body), | ||
envEnrichments(this.catchBody), | ||
envEnrichments(this.finallyBody) | ||
]); | ||
case !this['instanceof'](CS.Functions): | ||
return []; | ||
default: | ||
return nub(concatMap(this.childNodes, function (this$) { | ||
return concatMap(this.childNodes, function (this$) { | ||
return function (child) { | ||
@@ -161,5 +162,5 @@ if (in$(child, this$.listMembers)) { | ||
}; | ||
}(this))); | ||
}(this)); | ||
} | ||
}.call(this); | ||
}.call(this)); | ||
return difference(possibilities, inScope); | ||
@@ -166,0 +167,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var ArrayExpression, AssignmentExpression, BinaryExpression, BlockStatement, CallExpression, createNode, ctor, difference, exports, FunctionDeclaration, FunctionExpression, GenSym, handleLists, handlePrimitives, Identifier, isStatement, Literal, LogicalExpression, MemberExpression, NewExpression, node, nodeData, Nodes, ObjectExpression, params, Program, SequenceExpression, SwitchCase, SwitchStatement, TryStatement, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclaration; | ||
@@ -37,3 +37,3 @@ difference = require('./functional-helpers').difference; | ||
Nodes.prototype.toBasicObject = function () { | ||
var child, obj; | ||
var child, obj, p; | ||
obj = { type: this.type }; | ||
@@ -46,3 +46,2 @@ if (null != this.leadingComments) | ||
obj[child] = function (accum$) { | ||
var p; | ||
for (var i$1 = 0, length$1 = this[child].length; i$1 < length$1; ++i$1) { | ||
@@ -453,2 +452,7 @@ p = this[child][i$1]; | ||
handleLists(VariableDeclaration, ['declarations']); | ||
FunctionDeclaration.prototype.generated = FunctionExpression.prototype.generated = false; | ||
FunctionDeclaration.prototype.g = FunctionExpression.prototype.g = function () { | ||
this.generated = true; | ||
return this; | ||
}; | ||
function isOwn$(o, p) { | ||
@@ -455,0 +459,0 @@ return {}.hasOwnProperty.call(o, p); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var CoffeeScript, Compiler, cscodegen, escodegen, escodegenFormat, formatParserError, Nodes, Optimiser, Parser, pkg, Preprocessor; | ||
@@ -19,3 +19,3 @@ formatParserError = require('./helpers').formatParserError; | ||
return require('escodegen'); | ||
} catch (e$) { | ||
} catch (e$1) { | ||
return; | ||
@@ -58,4 +58,4 @@ } | ||
} | ||
} catch (e$) { | ||
e = e$; | ||
} catch (e$2) { | ||
e = e$2; | ||
if (!(e instanceof Parser.SyntaxError)) | ||
@@ -62,0 +62,0 @@ throw e; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var ArrayInitialiser, Block, Bool, Class, CompoundAssignOp, concat, concatMap, Conditional, createNodes, difference, exports, ForOf, FunctionApplications, Functions, GenSym, handleLists, handlePrimitives, HeregExp, Identifier, Identifiers, map, NegatedConditional, NewOp, Nodes, nub, ObjectInitialiser, Primitives, Range, RegExp, RegExps, Slice, StaticMemberAccessOps, Super, Switch, SwitchCase, union, While; | ||
@@ -20,3 +20,3 @@ cache$ = require('./functional-helpers'); | ||
(function (className) { | ||
var isCategory, klass, params, superclass; | ||
var externalCtor$, isCategory, klass, params, superclass; | ||
superclass = null != superclasses[0] ? superclasses[0] : function () { | ||
@@ -39,3 +39,2 @@ }; | ||
klass = function (super$) { | ||
var externalCtor$; | ||
extends$(class$, super$); | ||
@@ -372,3 +371,3 @@ externalCtor$ = isCategory ? function () { | ||
Nodes.prototype.toBasicObject = function () { | ||
var child, obj; | ||
var child, obj, p; | ||
obj = { type: this.className }; | ||
@@ -391,3 +390,2 @@ if (null != this.line) | ||
obj[child] = function (accum$) { | ||
var p; | ||
for (var i$1 = 0, length$1 = this[child].length; i$1 < length$1; ++i$1) { | ||
@@ -406,3 +404,3 @@ p = this[child][i$1]; | ||
Nodes.prototype.fold = function (memo, fn) { | ||
var child; | ||
var child, p; | ||
for (var i$ = 0, length$ = this.childNodes.length; i$ < length$; ++i$) { | ||
@@ -412,3 +410,2 @@ child = this.childNodes[i$]; | ||
memo = function (accum$) { | ||
var p; | ||
for (var i$1 = 0, length$1 = this[child].length; i$1 < length$1; ++i$1) { | ||
@@ -557,4 +554,4 @@ p = this[child][i$1]; | ||
}(Conditional); | ||
exports.NegatedWhile = function (super$) { | ||
extends$(NegatedWhile, super$); | ||
exports.NegatedWhile = function (super$1) { | ||
extends$(NegatedWhile, super$1); | ||
function NegatedWhile() { | ||
@@ -565,4 +562,4 @@ While.apply(this, arguments); | ||
}(While); | ||
exports.Loop = function (super$) { | ||
extends$(Loop, super$); | ||
exports.Loop = function (super$2) { | ||
extends$(Loop, super$2); | ||
function Loop(body) { | ||
@@ -569,0 +566,0 @@ While.call(this, new Bool(true).g(), body); |
@@ -1,3 +0,3 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
var all, any, beingDeclared, concat, concatMap, CS, declarationsFor, difference, envEnrichments, exports, foldl, foldl1, isFalsey, isTruthy, makeDispatcher, mayHaveSideEffects, union, usedAsExpression; | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var all, any, beingDeclared, concat, concatMap, CS, declarationsFor, defaultRules, difference, envEnrichments, exports, foldl, foldl1, isFalsey, isTruthy, makeDispatcher, mayHaveSideEffects, union, usedAsExpression; | ||
cache$ = require('./functional-helpers'); | ||
@@ -285,3 +285,3 @@ all = cache$.all; | ||
function (inScope) { | ||
var args, newScope; | ||
var args, newScope, p; | ||
if (!this.expression['instanceof'](CS.Functions)) | ||
@@ -291,3 +291,2 @@ return true; | ||
args = function (accum$) { | ||
var p; | ||
for (var i$ = 0, length$ = this.expression.parameters.length; i$ < length$; ++i$) { | ||
@@ -389,7 +388,6 @@ p = this.expression.parameters[i$]; | ||
exports.Optimiser = function () { | ||
var defaultRules; | ||
Optimiser.optimise = function (this$) { | ||
return function () { | ||
var cache$2; | ||
return (cache$2 = new this$).optimise.apply(cache$2, [].slice.call(arguments).concat()); | ||
return (cache$2 = new this$).optimise.apply(cache$2, [].slice.call(arguments)); | ||
}; | ||
@@ -396,0 +394,0 @@ }(Optimiser); |
@@ -1,7 +0,6 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
var pointToErrorLocation, Preprocessor, StringScanner; | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var DEDENT, INDENT, pointToErrorLocation, Preprocessor, StringScanner, TERM, ws; | ||
pointToErrorLocation = require('./helpers').pointToErrorLocation; | ||
StringScanner = require('StringScanner'); | ||
this.Preprocessor = Preprocessor = function () { | ||
var DEDENT, INDENT, TERM, ws; | ||
ws = '\\t\\x0B\\f\\r \\xA0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF'; | ||
@@ -88,2 +87,3 @@ INDENT = '\uefef'; | ||
this.err(c); | ||
this.indents.pop(); | ||
this.context.pop(); | ||
@@ -129,4 +129,57 @@ break; | ||
}; | ||
Preprocessor.prototype.consumeIndentation = function () { | ||
var context, indent, indentIndex, lineLen, lines, message; | ||
if (this.ss.bol() || this.scan(new RegExp('(?:[' + ws + ']*\\n)+'))) { | ||
this.scan(new RegExp('(?:[' + ws + ']*(\\#\\#?(?!\\#)[^\\n]*)?\\n)+')); | ||
if (null != this.base) { | ||
if (!(this.ss.eos() || null != this.scan(this.base))) { | ||
throw new Error('inconsistent base indentation'); | ||
} | ||
} else { | ||
this.base = new RegExp('' + this.scan(new RegExp('[' + ws + ']*')) + ''); | ||
} | ||
indentIndex = 0; | ||
while (indentIndex < this.indents.length) { | ||
indent = this.indents[indentIndex]; | ||
if (this.ss.check(new RegExp('' + indent + ''))) { | ||
this.scan(new RegExp('' + indent + '')); | ||
} else if (this.ss.eos() || this.ss.check(new RegExp('[^' + ws + ']'))) { | ||
--indentIndex; | ||
this.p('' + DEDENT + TERM); | ||
this.observe(DEDENT); | ||
} else { | ||
lines = this.ss.str.substr(0, this.ss.pos).split(/\n/) || ['']; | ||
message = 'Syntax error on line ' + lines.length + ': indentation is ambiguous'; | ||
lineLen = this.indents.reduce(function (l, r) { | ||
return l + r.length; | ||
}, 0); | ||
context = pointToErrorLocation(this.ss.str, lines.length, lineLen); | ||
throw new Error('' + message + '\n' + context); | ||
} | ||
++indentIndex; | ||
} | ||
if (this.ss.check(new RegExp('[' + ws + ']+[^' + ws + '#]'))) { | ||
this.indents.push(this.scan(new RegExp('[' + ws + ']+'))); | ||
this.p(INDENT); | ||
return this.observe(INDENT); | ||
} | ||
} | ||
}; | ||
Preprocessor.prototype.introduceContext = function () { | ||
var impliedRegexp, lastChar, pos, spaceBefore, tok; | ||
if (tok = this.scan(/"""|'''|\/\/\/|###|["'`#[({\\]/)) { | ||
return this.observe(tok); | ||
} else if (tok = this.scan(/\//)) { | ||
pos = this.ss.position(); | ||
if (pos > 1) { | ||
lastChar = this.ss.string()[pos - 2]; | ||
spaceBefore = new RegExp('[' + ws + ']').test(lastChar); | ||
impliedRegexp = /[;,=><*%^&|[(+!~-]/.test(lastChar); | ||
} | ||
if (pos === 1 || impliedRegexp || spaceBefore && !this.ss.check(new RegExp('[' + ws + '=]')) && this.ss.check(/[^\r\n]*\//)) | ||
return this.observe('/'); | ||
} | ||
}; | ||
Preprocessor.prototype.process = function (input) { | ||
var context, indent, indentIndex, lastChar, lineLen, lines, message, nonIdentifierBefore, pos, spaceBefore, tok; | ||
var tok; | ||
if (this.options.literate) | ||
@@ -139,75 +192,40 @@ input = input.replace(/^( {0,3}\S)/gm, ' #$1'); | ||
case INDENT: | ||
this.consumeIndentation(); | ||
this.scan(/[^\n'"\\\/#`[(){}\]]+/); | ||
if (this.ss.check(/[})\]]/)) { | ||
while (this.peek() === INDENT) { | ||
this.p('' + DEDENT + TERM); | ||
this.observe(DEDENT); | ||
} | ||
this.observe(this.scan(/[})\]]/)); | ||
} else { | ||
this.introduceContext(); | ||
} | ||
break; | ||
case '#{': | ||
case '[': | ||
case '(': | ||
case '{': | ||
if (this.ss.bol() || this.scan(new RegExp('(?:[' + ws + ']*\\n)+'))) { | ||
this.scan(new RegExp('(?:[' + ws + ']*(\\#\\#?(?!\\#)[^\\n]*)?\\n)+')); | ||
if (null != this.base) { | ||
if (!(this.ss.eos() || null != this.scan(this.base))) { | ||
throw new Error('inconsistent base indentation'); | ||
} | ||
} else { | ||
this.base = new RegExp('' + this.scan(new RegExp('[' + ws + ']*')) + ''); | ||
} | ||
indentIndex = 0; | ||
while (indentIndex < this.indents.length) { | ||
indent = this.indents[indentIndex]; | ||
if (this.ss.check(new RegExp('' + indent + ''))) { | ||
this.scan(new RegExp('' + indent + '')); | ||
} else if (this.ss.eos() || this.ss.check(new RegExp('[^' + ws + ']'))) { | ||
this.indents.splice(indentIndex, 1); | ||
--indentIndex; | ||
this.observe(DEDENT); | ||
this.p('' + DEDENT + TERM); | ||
} else { | ||
lines = this.ss.str.substr(0, this.ss.pos).split(/\n/) || ['']; | ||
message = 'Syntax error on line ' + lines.length + ': indentation is ambiguous'; | ||
lineLen = this.indents.reduce(function (l, r) { | ||
return l + r.length; | ||
}, 0); | ||
context = pointToErrorLocation(this.ss.str, lines.length, lineLen); | ||
throw new Error('' + message + '\n' + context); | ||
} | ||
++indentIndex; | ||
} | ||
if (this.ss.check(new RegExp('[' + ws + ']+[^' + ws + '#]'))) { | ||
this.indents.push(this.scan(new RegExp('[' + ws + ']+'))); | ||
this.observe(INDENT); | ||
this.p(INDENT); | ||
} | ||
this.scan(/[^\n'"\\\/#`[({}]+/); | ||
if (tok = this.scan(/\}/)) { | ||
this.observe(tok); | ||
} else { | ||
this.consumeIndentation(); | ||
this.introduceContext(); | ||
} | ||
tok = function () { | ||
switch (this.peek()) { | ||
case '[': | ||
this.scan(/[^\n'"\\\/#`[({\]]+/); | ||
return this.scan(/\]/); | ||
case '(': | ||
this.scan(/[^\n'"\\\/#`[({)]+/); | ||
return this.scan(/\)/); | ||
case '#{': | ||
case '{': | ||
this.scan(/[^\n'"\\\/#`[({}]+/); | ||
return this.scan(/\}/); | ||
default: { | ||
this.scan(/[^\n'"\\\/#`[({]+/); | ||
return null; | ||
} | ||
} | ||
}.call(this); | ||
if (tok) { | ||
break; | ||
case '[': | ||
this.scan(/[^\n'"\\\/#`[({\]]+/); | ||
if (tok = this.scan(/\]/)) { | ||
this.observe(tok); | ||
continue; | ||
} else { | ||
this.consumeIndentation(); | ||
this.introduceContext(); | ||
} | ||
if (tok = this.scan(/"""|'''|\/\/\/|###|["'`#[({\\]/)) { | ||
break; | ||
case '(': | ||
this.scan(/[^\n'"\\\/#`[({)]+/); | ||
if (tok = this.scan(/\)/)) { | ||
this.observe(tok); | ||
} else if (tok = this.scan(/\//)) { | ||
pos = this.ss.position(); | ||
if (pos > 1) { | ||
lastChar = this.ss.string()[pos - 2]; | ||
spaceBefore = new RegExp('[' + ws + ']').test(lastChar); | ||
nonIdentifierBefore = /[\W_$]/.test(lastChar); | ||
} | ||
if (pos === 1 || (spaceBefore ? !this.ss.check(new RegExp('[' + ws + '=]')) : nonIdentifierBefore)) | ||
this.observe('/'); | ||
} else { | ||
this.consumeIndentation(); | ||
this.introduceContext(); | ||
} | ||
@@ -299,8 +317,8 @@ break; | ||
case INDENT: | ||
this.p('' + DEDENT + TERM); | ||
this.observe(DEDENT); | ||
this.p('' + DEDENT + TERM); | ||
break; | ||
case '#': | ||
this.p('\n'); | ||
this.observe('\n'); | ||
this.p('\n'); | ||
break; | ||
@@ -307,0 +325,0 @@ default: |
@@ -1,4 +0,6 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
var CoffeeScript, fs, runModule; | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var child_process, coffeeBinary, CoffeeScript, fork, fs, path, runModule; | ||
child_process = require('child_process'); | ||
fs = require('fs'); | ||
path = require('path'); | ||
CoffeeScript = require('./module'); | ||
@@ -32,1 +34,29 @@ runModule = require('./run').runModule; | ||
}; | ||
fork = child_process.fork; | ||
if (!fork.coffeePatched) { | ||
coffeeBinary = path.resolve('bin', 'coffee'); | ||
child_process.fork = function (file, args, options) { | ||
if (null == args) | ||
args = []; | ||
if (null == options) | ||
options = {}; | ||
if (in$(path.extname(file), [ | ||
'.coffee', | ||
'.litcoffee' | ||
])) { | ||
if (!Array.isArray(args)) { | ||
args = []; | ||
options = args || {}; | ||
} | ||
options.execPath || (options.execPath = coffeeBinary); | ||
} | ||
return fork(file, args, options); | ||
}; | ||
child_process.fork.coffeePatched = true; | ||
} | ||
function in$(member, list) { | ||
for (var i = 0, length = list.length; i < length; ++i) | ||
if (i in list && list[i] === member) | ||
return true; | ||
return false; | ||
} |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var addHistory, addMultilineHandler, CoffeeScript, CS, fs, merge, nodeREPL, path, vm; | ||
@@ -3,0 +3,0 @@ fs = require('fs'); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 2.0.0-beta7 | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var CoffeeScript, formatSourcePosition, Module, patched, patchStackTrace, path, runMain, runModule, SourceMapConsumer; | ||
@@ -17,3 +17,3 @@ path = require('path'); | ||
return Error.prepareStackTrace = function (err, stack) { | ||
var frames, getSourceMapping, sourceFiles; | ||
var frame, frames, getSourceMapping, sourceFiles; | ||
sourceFiles = {}; | ||
@@ -32,3 +32,2 @@ getSourceMapping = function (filename, line, column) { | ||
frames = function (accum$) { | ||
var frame; | ||
for (var i$ = 0, length$ = stack.length; i$ < length$; ++i$) { | ||
@@ -35,0 +34,0 @@ frame = stack[i$]; |
{ | ||
"name": "coffee-script-redux", | ||
"author": "Michael Ficarra", | ||
"version": "2.0.0-beta7", | ||
"version": "2.0.0-beta8", | ||
"homepage": "https://github.com/michaelficarra/CoffeeScriptRedux", | ||
@@ -29,3 +29,5 @@ "bugs": "https://github.com/michaelficarra/CoffeeScriptRedux/issues", | ||
"pegjs": "git://github.com/dmajda/pegjs.git#bea6b1fde74c8aebf802f9bcc3380c65b241e1b7", | ||
"commonjs-everywhere": "~0.9.0" | ||
"commonjs-everywhere": "~0.9.0", | ||
"cluster": "~0.7.7", | ||
"semver": "~2.1.0" | ||
}, | ||
@@ -32,0 +34,0 @@ "dependencies": { |
@@ -44,4 +44,4 @@ CoffeeScript II: The Wrath of Khan | ||
git clone git://github.com/michaelficarra/CoffeeScriptRedux.git | ||
make clean && git co lib && make -j build && make test | ||
git clone git://github.com/michaelficarra/CoffeeScriptRedux.git && cd CoffeeScriptRedux && npm install | ||
make clean && git checkout -- lib && make -j build && make test | ||
@@ -48,0 +48,0 @@ ### Notable Contributors |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
800146
24811
5
4