mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
using 9e9 over 1/0 for compatibility
This commit is contained in:
@@ -790,7 +790,7 @@
|
||||
fromStr = from ? from.compile(o) : '0';
|
||||
compiled = to != null ? to.compile(o, LEVEL_PAREN) : void 0;
|
||||
if (to && !(!this.range.exclusive && +compiled === -1)) {
|
||||
toStr = ', ' + (this.range.exclusive ? to.compile(o) : /^[+-]?\d+$/.test(compiled) ? '' + (+compiled + 1) : ((_ref2 = to.cache(o), definition = _ref2[0], ref = _ref2[1], _ref2), '(' + definition.compile(o, LEVEL_PAREN) + ' + 1) ? ' + ref.compile(o) + ' : 1/0'));
|
||||
toStr = ', ' + (this.range.exclusive ? to.compile(o) : /^[+-]?\d+$/.test(compiled) ? '' + (+compiled + 1) : ((_ref2 = to.cache(o), definition = _ref2[0], ref = _ref2[1], _ref2), '(' + definition.compile(o, LEVEL_PAREN) + ' + 1) ? ' + ref.compile(o) + ' : 9e9'));
|
||||
}
|
||||
return ".slice(" + fromStr + (toStr || '') + ")";
|
||||
};
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
startIndent = 0;
|
||||
condition = function(token, i) {
|
||||
var one, tag, three, two, _ref, _ref2, _ref3;
|
||||
_ref2 = this.tokens.slice(i + 1, (_ref = i + 3 + 1) ? _ref : 1/0), one = _ref2[0], two = _ref2[1], three = _ref2[2];
|
||||
_ref2 = this.tokens.slice(i + 1, (_ref = i + 3 + 1) ? _ref : 9e9), one = _ref2[0], two = _ref2[1], three = _ref2[2];
|
||||
if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {
|
||||
return false;
|
||||
}
|
||||
@@ -164,7 +164,7 @@
|
||||
if (tag === 'CLASS' || tag === 'IF' || tag === 'UNLESS') {
|
||||
noCall = true;
|
||||
}
|
||||
_ref2 = tokens.slice(i - 1, (_ref = i + 1 + 1) ? _ref : 1/0), prev = _ref2[0], current = _ref2[1], next = _ref2[2];
|
||||
_ref2 = tokens.slice(i - 1, (_ref = i + 1 + 1) ? _ref : 9e9), prev = _ref2[0], current = _ref2[1], next = _ref2[2];
|
||||
callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref3 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref3) >= 0);
|
||||
seenSingle = false;
|
||||
if (__indexOf.call(LINEBREAKS, tag) >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user