/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['coffee-script/rewriter.js']) {
  _$jscoverage['coffee-script/rewriter.js'] = [];
  _$jscoverage['coffee-script/rewriter.js'][2] = 0;
  _$jscoverage['coffee-script/rewriter.js'][3] = 0;
  _$jscoverage['coffee-script/rewriter.js'][4] = 0;
  _$jscoverage['coffee-script/rewriter.js'][7] = 0;
  _$jscoverage['coffee-script/rewriter.js'][9] = 0;
  _$jscoverage['coffee-script/rewriter.js'][11] = 0;
  _$jscoverage['coffee-script/rewriter.js'][12] = 0;
  _$jscoverage['coffee-script/rewriter.js'][13] = 0;
  _$jscoverage['coffee-script/rewriter.js'][14] = 0;
  _$jscoverage['coffee-script/rewriter.js'][15] = 0;
  _$jscoverage['coffee-script/rewriter.js'][16] = 0;
  _$jscoverage['coffee-script/rewriter.js'][17] = 0;
  _$jscoverage['coffee-script/rewriter.js'][18] = 0;
  _$jscoverage['coffee-script/rewriter.js'][19] = 0;
  _$jscoverage['coffee-script/rewriter.js'][20] = 0;
  _$jscoverage['coffee-script/rewriter.js'][21] = 0;
  _$jscoverage['coffee-script/rewriter.js'][24] = 0;
  _$jscoverage['coffee-script/rewriter.js'][25] = 0;
  _$jscoverage['coffee-script/rewriter.js'][26] = 0;
  _$jscoverage['coffee-script/rewriter.js'][27] = 0;
  _$jscoverage['coffee-script/rewriter.js'][28] = 0;
  _$jscoverage['coffee-script/rewriter.js'][29] = 0;
  _$jscoverage['coffee-script/rewriter.js'][31] = 0;
  _$jscoverage['coffee-script/rewriter.js'][34] = 0;
  _$jscoverage['coffee-script/rewriter.js'][35] = 0;
  _$jscoverage['coffee-script/rewriter.js'][36] = 0;
  _$jscoverage['coffee-script/rewriter.js'][37] = 0;
  _$jscoverage['coffee-script/rewriter.js'][38] = 0;
  _$jscoverage['coffee-script/rewriter.js'][39] = 0;
  _$jscoverage['coffee-script/rewriter.js'][40] = 0;
  _$jscoverage['coffee-script/rewriter.js'][42] = 0;
  _$jscoverage['coffee-script/rewriter.js'][43] = 0;
  _$jscoverage['coffee-script/rewriter.js'][45] = 0;
  _$jscoverage['coffee-script/rewriter.js'][46] = 0;
  _$jscoverage['coffee-script/rewriter.js'][47] = 0;
  _$jscoverage['coffee-script/rewriter.js'][48] = 0;
  _$jscoverage['coffee-script/rewriter.js'][50] = 0;
  _$jscoverage['coffee-script/rewriter.js'][52] = 0;
  _$jscoverage['coffee-script/rewriter.js'][55] = 0;
  _$jscoverage['coffee-script/rewriter.js'][56] = 0;
  _$jscoverage['coffee-script/rewriter.js'][57] = 0;
  _$jscoverage['coffee-script/rewriter.js'][58] = 0;
  _$jscoverage['coffee-script/rewriter.js'][59] = 0;
  _$jscoverage['coffee-script/rewriter.js'][60] = 0;
  _$jscoverage['coffee-script/rewriter.js'][61] = 0;
  _$jscoverage['coffee-script/rewriter.js'][64] = 0;
  _$jscoverage['coffee-script/rewriter.js'][65] = 0;
  _$jscoverage['coffee-script/rewriter.js'][69] = 0;
  _$jscoverage['coffee-script/rewriter.js'][70] = 0;
  _$jscoverage['coffee-script/rewriter.js'][71] = 0;
  _$jscoverage['coffee-script/rewriter.js'][72] = 0;
  _$jscoverage['coffee-script/rewriter.js'][73] = 0;
  _$jscoverage['coffee-script/rewriter.js'][75] = 0;
  _$jscoverage['coffee-script/rewriter.js'][76] = 0;
  _$jscoverage['coffee-script/rewriter.js'][80] = 0;
  _$jscoverage['coffee-script/rewriter.js'][81] = 0;
  _$jscoverage['coffee-script/rewriter.js'][82] = 0;
  _$jscoverage['coffee-script/rewriter.js'][83] = 0;
  _$jscoverage['coffee-script/rewriter.js'][84] = 0;
  _$jscoverage['coffee-script/rewriter.js'][86] = 0;
  _$jscoverage['coffee-script/rewriter.js'][87] = 0;
  _$jscoverage['coffee-script/rewriter.js'][89] = 0;
  _$jscoverage['coffee-script/rewriter.js'][90] = 0;
  _$jscoverage['coffee-script/rewriter.js'][91] = 0;
  _$jscoverage['coffee-script/rewriter.js'][93] = 0;
  _$jscoverage['coffee-script/rewriter.js'][97] = 0;
  _$jscoverage['coffee-script/rewriter.js'][98] = 0;
  _$jscoverage['coffee-script/rewriter.js'][99] = 0;
  _$jscoverage['coffee-script/rewriter.js'][100] = 0;
  _$jscoverage['coffee-script/rewriter.js'][101] = 0;
  _$jscoverage['coffee-script/rewriter.js'][103] = 0;
  _$jscoverage['coffee-script/rewriter.js'][104] = 0;
  _$jscoverage['coffee-script/rewriter.js'][106] = 0;
  _$jscoverage['coffee-script/rewriter.js'][107] = 0;
  _$jscoverage['coffee-script/rewriter.js'][108] = 0;
  _$jscoverage['coffee-script/rewriter.js'][110] = 0;
  _$jscoverage['coffee-script/rewriter.js'][114] = 0;
  _$jscoverage['coffee-script/rewriter.js'][115] = 0;
  _$jscoverage['coffee-script/rewriter.js'][116] = 0;
  _$jscoverage['coffee-script/rewriter.js'][117] = 0;
  _$jscoverage['coffee-script/rewriter.js'][118] = 0;
  _$jscoverage['coffee-script/rewriter.js'][119] = 0;
  _$jscoverage['coffee-script/rewriter.js'][120] = 0;
  _$jscoverage['coffee-script/rewriter.js'][121] = 0;
  _$jscoverage['coffee-script/rewriter.js'][122] = 0;
  _$jscoverage['coffee-script/rewriter.js'][123] = 0;
  _$jscoverage['coffee-script/rewriter.js'][124] = 0;
  _$jscoverage['coffee-script/rewriter.js'][125] = 0;
  _$jscoverage['coffee-script/rewriter.js'][126] = 0;
  _$jscoverage['coffee-script/rewriter.js'][128] = 0;
  _$jscoverage['coffee-script/rewriter.js'][129] = 0;
  _$jscoverage['coffee-script/rewriter.js'][130] = 0;
  _$jscoverage['coffee-script/rewriter.js'][132] = 0;
  _$jscoverage['coffee-script/rewriter.js'][134] = 0;
  _$jscoverage['coffee-script/rewriter.js'][135] = 0;
  _$jscoverage['coffee-script/rewriter.js'][136] = 0;
  _$jscoverage['coffee-script/rewriter.js'][137] = 0;
  _$jscoverage['coffee-script/rewriter.js'][139] = 0;
  _$jscoverage['coffee-script/rewriter.js'][140] = 0;
  _$jscoverage['coffee-script/rewriter.js'][141] = 0;
  _$jscoverage['coffee-script/rewriter.js'][142] = 0;
  _$jscoverage['coffee-script/rewriter.js'][143] = 0;
  _$jscoverage['coffee-script/rewriter.js'][145] = 0;
  _$jscoverage['coffee-script/rewriter.js'][146] = 0;
  _$jscoverage['coffee-script/rewriter.js'][147] = 0;
  _$jscoverage['coffee-script/rewriter.js'][149] = 0;
  _$jscoverage['coffee-script/rewriter.js'][150] = 0;
  _$jscoverage['coffee-script/rewriter.js'][152] = 0;
  _$jscoverage['coffee-script/rewriter.js'][153] = 0;
  _$jscoverage['coffee-script/rewriter.js'][154] = 0;
  _$jscoverage['coffee-script/rewriter.js'][155] = 0;
  _$jscoverage['coffee-script/rewriter.js'][156] = 0;
  _$jscoverage['coffee-script/rewriter.js'][157] = 0;
  _$jscoverage['coffee-script/rewriter.js'][159] = 0;
  _$jscoverage['coffee-script/rewriter.js'][160] = 0;
  _$jscoverage['coffee-script/rewriter.js'][161] = 0;
  _$jscoverage['coffee-script/rewriter.js'][162] = 0;
  _$jscoverage['coffee-script/rewriter.js'][163] = 0;
  _$jscoverage['coffee-script/rewriter.js'][164] = 0;
  _$jscoverage['coffee-script/rewriter.js'][165] = 0;
  _$jscoverage['coffee-script/rewriter.js'][166] = 0;
  _$jscoverage['coffee-script/rewriter.js'][170] = 0;
  _$jscoverage['coffee-script/rewriter.js'][171] = 0;
  _$jscoverage['coffee-script/rewriter.js'][172] = 0;
  _$jscoverage['coffee-script/rewriter.js'][173] = 0;
  _$jscoverage['coffee-script/rewriter.js'][174] = 0;
  _$jscoverage['coffee-script/rewriter.js'][175] = 0;
  _$jscoverage['coffee-script/rewriter.js'][176] = 0;
  _$jscoverage['coffee-script/rewriter.js'][177] = 0;
  _$jscoverage['coffee-script/rewriter.js'][179] = 0;
  _$jscoverage['coffee-script/rewriter.js'][180] = 0;
  _$jscoverage['coffee-script/rewriter.js'][182] = 0;
  _$jscoverage['coffee-script/rewriter.js'][183] = 0;
  _$jscoverage['coffee-script/rewriter.js'][185] = 0;
  _$jscoverage['coffee-script/rewriter.js'][186] = 0;
  _$jscoverage['coffee-script/rewriter.js'][188] = 0;
  _$jscoverage['coffee-script/rewriter.js'][190] = 0;
  _$jscoverage['coffee-script/rewriter.js'][191] = 0;
  _$jscoverage['coffee-script/rewriter.js'][193] = 0;
  _$jscoverage['coffee-script/rewriter.js'][194] = 0;
  _$jscoverage['coffee-script/rewriter.js'][195] = 0;
  _$jscoverage['coffee-script/rewriter.js'][196] = 0;
  _$jscoverage['coffee-script/rewriter.js'][197] = 0;
  _$jscoverage['coffee-script/rewriter.js'][199] = 0;
  _$jscoverage['coffee-script/rewriter.js'][200] = 0;
  _$jscoverage['coffee-script/rewriter.js'][201] = 0;
  _$jscoverage['coffee-script/rewriter.js'][202] = 0;
  _$jscoverage['coffee-script/rewriter.js'][203] = 0;
  _$jscoverage['coffee-script/rewriter.js'][204] = 0;
  _$jscoverage['coffee-script/rewriter.js'][206] = 0;
  _$jscoverage['coffee-script/rewriter.js'][207] = 0;
  _$jscoverage['coffee-script/rewriter.js'][209] = 0;
  _$jscoverage['coffee-script/rewriter.js'][210] = 0;
  _$jscoverage['coffee-script/rewriter.js'][212] = 0;
  _$jscoverage['coffee-script/rewriter.js'][213] = 0;
  _$jscoverage['coffee-script/rewriter.js'][215] = 0;
  _$jscoverage['coffee-script/rewriter.js'][216] = 0;
  _$jscoverage['coffee-script/rewriter.js'][217] = 0;
  _$jscoverage['coffee-script/rewriter.js'][218] = 0;
  _$jscoverage['coffee-script/rewriter.js'][220] = 0;
  _$jscoverage['coffee-script/rewriter.js'][224] = 0;
  _$jscoverage['coffee-script/rewriter.js'][225] = 0;
  _$jscoverage['coffee-script/rewriter.js'][226] = 0;
  _$jscoverage['coffee-script/rewriter.js'][227] = 0;
  _$jscoverage['coffee-script/rewriter.js'][228] = 0;
  _$jscoverage['coffee-script/rewriter.js'][229] = 0;
  _$jscoverage['coffee-script/rewriter.js'][231] = 0;
  _$jscoverage['coffee-script/rewriter.js'][232] = 0;
  _$jscoverage['coffee-script/rewriter.js'][234] = 0;
  _$jscoverage['coffee-script/rewriter.js'][235] = 0;
  _$jscoverage['coffee-script/rewriter.js'][236] = 0;
  _$jscoverage['coffee-script/rewriter.js'][237] = 0;
  _$jscoverage['coffee-script/rewriter.js'][238] = 0;
  _$jscoverage['coffee-script/rewriter.js'][239] = 0;
  _$jscoverage['coffee-script/rewriter.js'][241] = 0;
  _$jscoverage['coffee-script/rewriter.js'][242] = 0;
  _$jscoverage['coffee-script/rewriter.js'][243] = 0;
  _$jscoverage['coffee-script/rewriter.js'][245] = 0;
  _$jscoverage['coffee-script/rewriter.js'][246] = 0;
  _$jscoverage['coffee-script/rewriter.js'][247] = 0;
  _$jscoverage['coffee-script/rewriter.js'][249] = 0;
  _$jscoverage['coffee-script/rewriter.js'][250] = 0;
  _$jscoverage['coffee-script/rewriter.js'][251] = 0;
  _$jscoverage['coffee-script/rewriter.js'][252] = 0;
  _$jscoverage['coffee-script/rewriter.js'][253] = 0;
  _$jscoverage['coffee-script/rewriter.js'][255] = 0;
  _$jscoverage['coffee-script/rewriter.js'][256] = 0;
  _$jscoverage['coffee-script/rewriter.js'][257] = 0;
  _$jscoverage['coffee-script/rewriter.js'][258] = 0;
  _$jscoverage['coffee-script/rewriter.js'][260] = 0;
  _$jscoverage['coffee-script/rewriter.js'][262] = 0;
  _$jscoverage['coffee-script/rewriter.js'][266] = 0;
  _$jscoverage['coffee-script/rewriter.js'][267] = 0;
  _$jscoverage['coffee-script/rewriter.js'][268] = 0;
  _$jscoverage['coffee-script/rewriter.js'][269] = 0;
  _$jscoverage['coffee-script/rewriter.js'][270] = 0;
  _$jscoverage['coffee-script/rewriter.js'][271] = 0;
  _$jscoverage['coffee-script/rewriter.js'][273] = 0;
  _$jscoverage['coffee-script/rewriter.js'][274] = 0;
  _$jscoverage['coffee-script/rewriter.js'][275] = 0;
  _$jscoverage['coffee-script/rewriter.js'][278] = 0;
  _$jscoverage['coffee-script/rewriter.js'][279] = 0;
  _$jscoverage['coffee-script/rewriter.js'][280] = 0;
  _$jscoverage['coffee-script/rewriter.js'][282] = 0;
  _$jscoverage['coffee-script/rewriter.js'][283] = 0;
  _$jscoverage['coffee-script/rewriter.js'][284] = 0;
  _$jscoverage['coffee-script/rewriter.js'][288] = 0;
  _$jscoverage['coffee-script/rewriter.js'][289] = 0;
  _$jscoverage['coffee-script/rewriter.js'][290] = 0;
  _$jscoverage['coffee-script/rewriter.js'][291] = 0;
  _$jscoverage['coffee-script/rewriter.js'][293] = 0;
  _$jscoverage['coffee-script/rewriter.js'][294] = 0;
  _$jscoverage['coffee-script/rewriter.js'][295] = 0;
  _$jscoverage['coffee-script/rewriter.js'][296] = 0;
  _$jscoverage['coffee-script/rewriter.js'][298] = 0;
  _$jscoverage['coffee-script/rewriter.js'][301] = 0;
  _$jscoverage['coffee-script/rewriter.js'][302] = 0;
  _$jscoverage['coffee-script/rewriter.js'][303] = 0;
  _$jscoverage['coffee-script/rewriter.js'][304] = 0;
  _$jscoverage['coffee-script/rewriter.js'][305] = 0;
  _$jscoverage['coffee-script/rewriter.js'][308] = 0;
  _$jscoverage['coffee-script/rewriter.js'][309] = 0;
  _$jscoverage['coffee-script/rewriter.js'][310] = 0;
  _$jscoverage['coffee-script/rewriter.js'][313] = 0;
  _$jscoverage['coffee-script/rewriter.js'][317] = 0;
  _$jscoverage['coffee-script/rewriter.js'][319] = 0;
  _$jscoverage['coffee-script/rewriter.js'][321] = 0;
  _$jscoverage['coffee-script/rewriter.js'][323] = 0;
  _$jscoverage['coffee-script/rewriter.js'][325] = 0;
  _$jscoverage['coffee-script/rewriter.js'][326] = 0;
  _$jscoverage['coffee-script/rewriter.js'][327] = 0;
  _$jscoverage['coffee-script/rewriter.js'][328] = 0;
  _$jscoverage['coffee-script/rewriter.js'][331] = 0;
  _$jscoverage['coffee-script/rewriter.js'][333] = 0;
  _$jscoverage['coffee-script/rewriter.js'][335] = 0;
  _$jscoverage['coffee-script/rewriter.js'][337] = 0;
  _$jscoverage['coffee-script/rewriter.js'][339] = 0;
  _$jscoverage['coffee-script/rewriter.js'][341] = 0;
  _$jscoverage['coffee-script/rewriter.js'][343] = 0;
  _$jscoverage['coffee-script/rewriter.js'][345] = 0;
  _$jscoverage['coffee-script/rewriter.js'][347] = 0;
}
_$jscoverage['coffee-script/rewriter.js'][2]++;
(function () {
  _$jscoverage['coffee-script/rewriter.js'][3]++;
  var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref, __indexOf = [].indexOf || (function (item) {
  _$jscoverage['coffee-script/rewriter.js'][4]++;
  for (var i = 0, l = this.length; i < l; i++) {
    _$jscoverage['coffee-script/rewriter.js'][4]++;
    if (i in this && this[i] === item) {
      _$jscoverage['coffee-script/rewriter.js'][4]++;
      return i;
    }
}
  _$jscoverage['coffee-script/rewriter.js'][4]++;
  return -1;
}), __slice = [].slice;
  _$jscoverage['coffee-script/rewriter.js'][7]++;
  exports.Rewriter = (function () {
  _$jscoverage['coffee-script/rewriter.js'][9]++;
  function Rewriter() {
}
  _$jscoverage['coffee-script/rewriter.js'][11]++;
  Rewriter.prototype.rewrite = (function (tokens) {
  _$jscoverage['coffee-script/rewriter.js'][12]++;
  this.tokens = tokens;
  _$jscoverage['coffee-script/rewriter.js'][13]++;
  this.removeLeadingNewlines();
  _$jscoverage['coffee-script/rewriter.js'][14]++;
  this.removeMidExpressionNewlines();
  _$jscoverage['coffee-script/rewriter.js'][15]++;
  this.closeOpenCalls();
  _$jscoverage['coffee-script/rewriter.js'][16]++;
  this.closeOpenIndexes();
  _$jscoverage['coffee-script/rewriter.js'][17]++;
  this.addImplicitIndentation();
  _$jscoverage['coffee-script/rewriter.js'][18]++;
  this.tagPostfixConditionals();
  _$jscoverage['coffee-script/rewriter.js'][19]++;
  this.addImplicitBraces();
  _$jscoverage['coffee-script/rewriter.js'][20]++;
  this.addImplicitParentheses();
  _$jscoverage['coffee-script/rewriter.js'][21]++;
  return this.tokens;
});
  _$jscoverage['coffee-script/rewriter.js'][24]++;
  Rewriter.prototype.scanTokens = (function (block) {
  _$jscoverage['coffee-script/rewriter.js'][25]++;
  var i, token, tokens;
  _$jscoverage['coffee-script/rewriter.js'][26]++;
  tokens = this.tokens;
  _$jscoverage['coffee-script/rewriter.js'][27]++;
  i = 0;
  _$jscoverage['coffee-script/rewriter.js'][28]++;
  while (token = tokens[i]) {
    _$jscoverage['coffee-script/rewriter.js'][29]++;
    i += block.call(this, token, i, tokens);
}
  _$jscoverage['coffee-script/rewriter.js'][31]++;
  return true;
});
  _$jscoverage['coffee-script/rewriter.js'][34]++;
  Rewriter.prototype.detectEnd = (function (i, condition, action) {
  _$jscoverage['coffee-script/rewriter.js'][35]++;
  var levels, token, tokens, _ref, _ref1;
  _$jscoverage['coffee-script/rewriter.js'][36]++;
  tokens = this.tokens;
  _$jscoverage['coffee-script/rewriter.js'][37]++;
  levels = 0;
  _$jscoverage['coffee-script/rewriter.js'][38]++;
  while (token = tokens[i]) {
    _$jscoverage['coffee-script/rewriter.js'][39]++;
    if (levels === 0 && condition.call(this, token, i)) {
      _$jscoverage['coffee-script/rewriter.js'][40]++;
      return action.call(this, token, i);
    }
    _$jscoverage['coffee-script/rewriter.js'][42]++;
    if (! token || levels < 0) {
      _$jscoverage['coffee-script/rewriter.js'][43]++;
      return action.call(this, token, i - 1);
    }
    _$jscoverage['coffee-script/rewriter.js'][45]++;
    if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
      _$jscoverage['coffee-script/rewriter.js'][46]++;
      levels += 1;
    }
    else {
      _$jscoverage['coffee-script/rewriter.js'][47]++;
      if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
        _$jscoverage['coffee-script/rewriter.js'][48]++;
        levels -= 1;
      }
    }
    _$jscoverage['coffee-script/rewriter.js'][50]++;
    i += 1;
}
  _$jscoverage['coffee-script/rewriter.js'][52]++;
  return i - 1;
});
  _$jscoverage['coffee-script/rewriter.js'][55]++;
  Rewriter.prototype.removeLeadingNewlines = (function () {
  _$jscoverage['coffee-script/rewriter.js'][56]++;
  var i, tag, _i, _len, _ref;
  _$jscoverage['coffee-script/rewriter.js'][57]++;
  _ref = this.tokens;
  _$jscoverage['coffee-script/rewriter.js'][58]++;
  for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
    _$jscoverage['coffee-script/rewriter.js'][59]++;
    tag = _ref[i][0];
    _$jscoverage['coffee-script/rewriter.js'][60]++;
    if (tag !== "TERMINATOR") {
      _$jscoverage['coffee-script/rewriter.js'][61]++;
      break;
    }
}
  _$jscoverage['coffee-script/rewriter.js'][64]++;
  if (i) {
    _$jscoverage['coffee-script/rewriter.js'][65]++;
    return this.tokens.splice(0, i);
  }
});
  _$jscoverage['coffee-script/rewriter.js'][69]++;
  Rewriter.prototype.removeMidExpressionNewlines = (function () {
  _$jscoverage['coffee-script/rewriter.js'][70]++;
  return this.scanTokens((function (token, i, tokens) {
  _$jscoverage['coffee-script/rewriter.js'][71]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][72]++;
  if (! (token[0] === "TERMINATOR" && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) {
    _$jscoverage['coffee-script/rewriter.js'][73]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][75]++;
  tokens.splice(i, 1);
  _$jscoverage['coffee-script/rewriter.js'][76]++;
  return 0;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][80]++;
  Rewriter.prototype.closeOpenCalls = (function () {
  _$jscoverage['coffee-script/rewriter.js'][81]++;
  var action, condition;
  _$jscoverage['coffee-script/rewriter.js'][82]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][83]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][84]++;
  return ((_ref = token[0]) === ")" || _ref === "CALL_END") || token[0] === "OUTDENT" && this.tag(i - 1) === ")";
});
  _$jscoverage['coffee-script/rewriter.js'][86]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][87]++;
  return this.tokens[token[0] === "OUTDENT"? i - 1: i][0] = "CALL_END";
});
  _$jscoverage['coffee-script/rewriter.js'][89]++;
  return this.scanTokens((function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][90]++;
  if (token[0] === "CALL_START") {
    _$jscoverage['coffee-script/rewriter.js'][91]++;
    this.detectEnd(i + 1, condition, action);
  }
  _$jscoverage['coffee-script/rewriter.js'][93]++;
  return 1;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][97]++;
  Rewriter.prototype.closeOpenIndexes = (function () {
  _$jscoverage['coffee-script/rewriter.js'][98]++;
  var action, condition;
  _$jscoverage['coffee-script/rewriter.js'][99]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][100]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][101]++;
  return (_ref = token[0]) === "]" || _ref === "INDEX_END";
});
  _$jscoverage['coffee-script/rewriter.js'][103]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][104]++;
  return token[0] = "INDEX_END";
});
  _$jscoverage['coffee-script/rewriter.js'][106]++;
  return this.scanTokens((function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][107]++;
  if (token[0] === "INDEX_START") {
    _$jscoverage['coffee-script/rewriter.js'][108]++;
    this.detectEnd(i + 1, condition, action);
  }
  _$jscoverage['coffee-script/rewriter.js'][110]++;
  return 1;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][114]++;
  Rewriter.prototype.addImplicitBraces = (function () {
  _$jscoverage['coffee-script/rewriter.js'][115]++;
  var action, condition, sameLine, stack, start, startIndent, startIndex, startsLine;
  _$jscoverage['coffee-script/rewriter.js'][116]++;
  stack = [];
  _$jscoverage['coffee-script/rewriter.js'][117]++;
  start = null;
  _$jscoverage['coffee-script/rewriter.js'][118]++;
  startsLine = null;
  _$jscoverage['coffee-script/rewriter.js'][119]++;
  sameLine = true;
  _$jscoverage['coffee-script/rewriter.js'][120]++;
  startIndent = 0;
  _$jscoverage['coffee-script/rewriter.js'][121]++;
  startIndex = 0;
  _$jscoverage['coffee-script/rewriter.js'][122]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][123]++;
  var one, tag, three, two, _ref, _ref1;
  _$jscoverage['coffee-script/rewriter.js'][124]++;
  _ref = this.tokens.slice(i + 1, + (i + 3) + 1 || 9000000000), one = _ref[0], two = _ref[1], three = _ref[2];
  _$jscoverage['coffee-script/rewriter.js'][125]++;
  if ("HERECOMMENT" === (one != null? one[0]: void 0)) {
    _$jscoverage['coffee-script/rewriter.js'][126]++;
    return false;
  }
  _$jscoverage['coffee-script/rewriter.js'][128]++;
  tag = token[0];
  _$jscoverage['coffee-script/rewriter.js'][129]++;
  if (__indexOf.call(LINEBREAKS, tag) >= 0) {
    _$jscoverage['coffee-script/rewriter.js'][130]++;
    sameLine = false;
  }
  _$jscoverage['coffee-script/rewriter.js'][132]++;
  return (((tag === "TERMINATOR" || tag === "OUTDENT") || (__indexOf.call(IMPLICIT_END, tag) >= 0 && sameLine && ! (i - startIndex === 1))) && ((! startsLine && this.tag(i - 1) !== ",") || ! ((two != null? two[0]: void 0) === ":" || (one != null? one[0]: void 0) === "@" && (three != null? three[0]: void 0) === ":"))) || (tag === "," && one && ((_ref1 = one[0]) !== "IDENTIFIER" && _ref1 !== "NUMBER" && _ref1 !== "STRING" && _ref1 !== "@" && _ref1 !== "TERMINATOR" && _ref1 !== "OUTDENT"));
});
  _$jscoverage['coffee-script/rewriter.js'][134]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][135]++;
  var tok;
  _$jscoverage['coffee-script/rewriter.js'][136]++;
  tok = this.generate("}", "}", token[2]);
  _$jscoverage['coffee-script/rewriter.js'][137]++;
  return this.tokens.splice(i, 0, tok);
});
  _$jscoverage['coffee-script/rewriter.js'][139]++;
  return this.scanTokens((function (token, i, tokens) {
  _$jscoverage['coffee-script/rewriter.js'][140]++;
  var ago, idx, prevTag, tag, tok, value, _ref, _ref1;
  _$jscoverage['coffee-script/rewriter.js'][141]++;
  if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) >= 0) {
    _$jscoverage['coffee-script/rewriter.js'][142]++;
    stack.push([(tag === "INDENT" && this.tag(i - 1) === "{"? "{": tag), i]);
    _$jscoverage['coffee-script/rewriter.js'][143]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][145]++;
  if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
    _$jscoverage['coffee-script/rewriter.js'][146]++;
    start = stack.pop();
    _$jscoverage['coffee-script/rewriter.js'][147]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][149]++;
  if (! (tag === ":" && ((ago = this.tag(i - 2)) === ":" || ((_ref1 = stack[stack.length - 1]) != null? _ref1[0]: void 0) !== "{"))) {
    _$jscoverage['coffee-script/rewriter.js'][150]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][152]++;
  sameLine = true;
  _$jscoverage['coffee-script/rewriter.js'][153]++;
  startIndex = i + 1;
  _$jscoverage['coffee-script/rewriter.js'][154]++;
  stack.push(["{"]);
  _$jscoverage['coffee-script/rewriter.js'][155]++;
  idx = ago === "@"? i - 2: i - 1;
  _$jscoverage['coffee-script/rewriter.js'][156]++;
  while (this.tag(idx - 2) === "HERECOMMENT") {
    _$jscoverage['coffee-script/rewriter.js'][157]++;
    idx -= 2;
}
  _$jscoverage['coffee-script/rewriter.js'][159]++;
  prevTag = this.tag(idx - 1);
  _$jscoverage['coffee-script/rewriter.js'][160]++;
  startsLine = ! prevTag || (__indexOf.call(LINEBREAKS, prevTag) >= 0);
  _$jscoverage['coffee-script/rewriter.js'][161]++;
  value = new String("{");
  _$jscoverage['coffee-script/rewriter.js'][162]++;
  value.generated = true;
  _$jscoverage['coffee-script/rewriter.js'][163]++;
  tok = this.generate("{", value, token[2]);
  _$jscoverage['coffee-script/rewriter.js'][164]++;
  tokens.splice(idx, 0, tok);
  _$jscoverage['coffee-script/rewriter.js'][165]++;
  this.detectEnd(i + 2, condition, action);
  _$jscoverage['coffee-script/rewriter.js'][166]++;
  return 2;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][170]++;
  Rewriter.prototype.addImplicitParentheses = (function () {
  _$jscoverage['coffee-script/rewriter.js'][171]++;
  var action, condition, noCall, seenControl, seenSingle;
  _$jscoverage['coffee-script/rewriter.js'][172]++;
  noCall = seenSingle = seenControl = false;
  _$jscoverage['coffee-script/rewriter.js'][173]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][174]++;
  var post, tag, _ref, _ref1;
  _$jscoverage['coffee-script/rewriter.js'][175]++;
  tag = token[0];
  _$jscoverage['coffee-script/rewriter.js'][176]++;
  if (! seenSingle && token.fromThen) {
    _$jscoverage['coffee-script/rewriter.js'][177]++;
    return true;
  }
  _$jscoverage['coffee-script/rewriter.js'][179]++;
  if (tag === "IF" || tag === "ELSE" || tag === "CATCH" || tag === "->" || tag === "=>" || tag === "CLASS") {
    _$jscoverage['coffee-script/rewriter.js'][180]++;
    seenSingle = true;
  }
  _$jscoverage['coffee-script/rewriter.js'][182]++;
  if (tag === "IF" || tag === "ELSE" || tag === "SWITCH" || tag === "TRY" || tag === "=") {
    _$jscoverage['coffee-script/rewriter.js'][183]++;
    seenControl = true;
  }
  _$jscoverage['coffee-script/rewriter.js'][185]++;
  if ((tag === "." || tag === "?." || tag === "::") && this.tag(i - 1) === "OUTDENT") {
    _$jscoverage['coffee-script/rewriter.js'][186]++;
    return true;
  }
  _$jscoverage['coffee-script/rewriter.js'][188]++;
  return ! token.generated && this.tag(i - 1) !== "," && (__indexOf.call(IMPLICIT_END, tag) >= 0 || (tag === "INDENT" && ! seenControl)) && (tag !== "INDENT" || (((_ref = this.tag(i - 2)) !== "CLASS" && _ref !== "EXTENDS") && (_ref1 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref1) < 0) && ! ((post = this.tokens[i + 1]) && post.generated && post[0] === "{")));
});
  _$jscoverage['coffee-script/rewriter.js'][190]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][191]++;
  return this.tokens.splice(i, 0, this.generate("CALL_END", ")", token[2]));
});
  _$jscoverage['coffee-script/rewriter.js'][193]++;
  return this.scanTokens((function (token, i, tokens) {
  _$jscoverage['coffee-script/rewriter.js'][194]++;
  var callObject, current, next, prev, tag, _ref, _ref1, _ref2;
  _$jscoverage['coffee-script/rewriter.js'][195]++;
  tag = token[0];
  _$jscoverage['coffee-script/rewriter.js'][196]++;
  if (tag === "CLASS" || tag === "IF" || tag === "FOR" || tag === "WHILE") {
    _$jscoverage['coffee-script/rewriter.js'][197]++;
    noCall = true;
  }
  _$jscoverage['coffee-script/rewriter.js'][199]++;
  _ref = tokens.slice(i - 1, + (i + 1) + 1 || 9000000000), prev = _ref[0], current = _ref[1], next = _ref[2];
  _$jscoverage['coffee-script/rewriter.js'][200]++;
  callObject = ! noCall && tag === "INDENT" && next && next.generated && next[0] === "{" && prev && (_ref1 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref1) >= 0);
  _$jscoverage['coffee-script/rewriter.js'][201]++;
  seenSingle = false;
  _$jscoverage['coffee-script/rewriter.js'][202]++;
  seenControl = false;
  _$jscoverage['coffee-script/rewriter.js'][203]++;
  if (__indexOf.call(LINEBREAKS, tag) >= 0) {
    _$jscoverage['coffee-script/rewriter.js'][204]++;
    noCall = false;
  }
  _$jscoverage['coffee-script/rewriter.js'][206]++;
  if (prev && ! prev.spaced && tag === "?") {
    _$jscoverage['coffee-script/rewriter.js'][207]++;
    token.call = true;
  }
  _$jscoverage['coffee-script/rewriter.js'][209]++;
  if (token.fromThen) {
    _$jscoverage['coffee-script/rewriter.js'][210]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][212]++;
  if (! (callObject || (prev != null? prev.spaced: void 0) && (prev.call || (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || ! (token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
    _$jscoverage['coffee-script/rewriter.js'][213]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][215]++;
  tokens.splice(i, 0, this.generate("CALL_START", "(", token[2]));
  _$jscoverage['coffee-script/rewriter.js'][216]++;
  this.detectEnd(i + 1, condition, action);
  _$jscoverage['coffee-script/rewriter.js'][217]++;
  if (prev[0] === "?") {
    _$jscoverage['coffee-script/rewriter.js'][218]++;
    prev[0] = "FUNC_EXIST";
  }
  _$jscoverage['coffee-script/rewriter.js'][220]++;
  return 2;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][224]++;
  Rewriter.prototype.addImplicitIndentation = (function () {
  _$jscoverage['coffee-script/rewriter.js'][225]++;
  var action, condition, indent, outdent, starter;
  _$jscoverage['coffee-script/rewriter.js'][226]++;
  starter = indent = outdent = null;
  _$jscoverage['coffee-script/rewriter.js'][227]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][228]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][229]++;
  return token[1] !== ";" && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && ! (token[0] === "ELSE" && (starter !== "IF" && starter !== "THEN"));
});
  _$jscoverage['coffee-script/rewriter.js'][231]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][232]++;
  return this.tokens.splice((this.tag(i - 1) === ","? i - 1: i), 0, outdent);
});
  _$jscoverage['coffee-script/rewriter.js'][234]++;
  return this.scanTokens((function (token, i, tokens) {
  _$jscoverage['coffee-script/rewriter.js'][235]++;
  var tag, _ref, _ref1;
  _$jscoverage['coffee-script/rewriter.js'][236]++;
  tag = token[0];
  _$jscoverage['coffee-script/rewriter.js'][237]++;
  if (tag === "TERMINATOR" && this.tag(i + 1) === "THEN") {
    _$jscoverage['coffee-script/rewriter.js'][238]++;
    tokens.splice(i, 1);
    _$jscoverage['coffee-script/rewriter.js'][239]++;
    return 0;
  }
  _$jscoverage['coffee-script/rewriter.js'][241]++;
  if (tag === "ELSE" && this.tag(i - 1) !== "OUTDENT") {
    _$jscoverage['coffee-script/rewriter.js'][242]++;
    tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation(token))));
    _$jscoverage['coffee-script/rewriter.js'][243]++;
    return 2;
  }
  _$jscoverage['coffee-script/rewriter.js'][245]++;
  if (tag === "CATCH" && ((_ref = this.tag(i + 2)) === "OUTDENT" || _ref === "TERMINATOR" || _ref === "FINALLY")) {
    _$jscoverage['coffee-script/rewriter.js'][246]++;
    tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation(token))));
    _$jscoverage['coffee-script/rewriter.js'][247]++;
    return 4;
  }
  _$jscoverage['coffee-script/rewriter.js'][249]++;
  if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== "INDENT" && ! (tag === "ELSE" && this.tag(i + 1) === "IF")) {
    _$jscoverage['coffee-script/rewriter.js'][250]++;
    starter = tag;
    _$jscoverage['coffee-script/rewriter.js'][251]++;
    _ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1];
    _$jscoverage['coffee-script/rewriter.js'][252]++;
    if (starter === "THEN") {
      _$jscoverage['coffee-script/rewriter.js'][253]++;
      indent.fromThen = true;
    }
    _$jscoverage['coffee-script/rewriter.js'][255]++;
    tokens.splice(i + 1, 0, indent);
    _$jscoverage['coffee-script/rewriter.js'][256]++;
    this.detectEnd(i + 2, condition, action);
    _$jscoverage['coffee-script/rewriter.js'][257]++;
    if (tag === "THEN") {
      _$jscoverage['coffee-script/rewriter.js'][258]++;
      tokens.splice(i, 1);
    }
    _$jscoverage['coffee-script/rewriter.js'][260]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][262]++;
  return 1;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][266]++;
  Rewriter.prototype.tagPostfixConditionals = (function () {
  _$jscoverage['coffee-script/rewriter.js'][267]++;
  var action, condition, original;
  _$jscoverage['coffee-script/rewriter.js'][268]++;
  original = null;
  _$jscoverage['coffee-script/rewriter.js'][269]++;
  condition = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][270]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][271]++;
  return (_ref = token[0]) === "TERMINATOR" || _ref === "INDENT";
});
  _$jscoverage['coffee-script/rewriter.js'][273]++;
  action = (function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][274]++;
  if (token[0] !== "INDENT" || (token.generated && ! token.fromThen)) {
    _$jscoverage['coffee-script/rewriter.js'][275]++;
    return original[0] = "POST_" + original[0];
  }
});
  _$jscoverage['coffee-script/rewriter.js'][278]++;
  return this.scanTokens((function (token, i) {
  _$jscoverage['coffee-script/rewriter.js'][279]++;
  if (token[0] !== "IF") {
    _$jscoverage['coffee-script/rewriter.js'][280]++;
    return 1;
  }
  _$jscoverage['coffee-script/rewriter.js'][282]++;
  original = token;
  _$jscoverage['coffee-script/rewriter.js'][283]++;
  this.detectEnd(i + 1, condition, action);
  _$jscoverage['coffee-script/rewriter.js'][284]++;
  return 1;
}));
});
  _$jscoverage['coffee-script/rewriter.js'][288]++;
  Rewriter.prototype.indentation = (function (token, implicit) {
  _$jscoverage['coffee-script/rewriter.js'][289]++;
  var indent, outdent;
  _$jscoverage['coffee-script/rewriter.js'][290]++;
  if (implicit == null) {
    _$jscoverage['coffee-script/rewriter.js'][291]++;
    implicit = false;
  }
  _$jscoverage['coffee-script/rewriter.js'][293]++;
  indent = ["INDENT", 2, token[2]];
  _$jscoverage['coffee-script/rewriter.js'][294]++;
  outdent = ["OUTDENT", 2, token[2]];
  _$jscoverage['coffee-script/rewriter.js'][295]++;
  if (implicit) {
    _$jscoverage['coffee-script/rewriter.js'][296]++;
    indent.generated = outdent.generated = true;
  }
  _$jscoverage['coffee-script/rewriter.js'][298]++;
  return [indent, outdent];
});
  _$jscoverage['coffee-script/rewriter.js'][301]++;
  Rewriter.prototype.generate = (function (tag, value, line) {
  _$jscoverage['coffee-script/rewriter.js'][302]++;
  var tok;
  _$jscoverage['coffee-script/rewriter.js'][303]++;
  tok = [tag, value, line];
  _$jscoverage['coffee-script/rewriter.js'][304]++;
  tok.generated = true;
  _$jscoverage['coffee-script/rewriter.js'][305]++;
  return tok;
});
  _$jscoverage['coffee-script/rewriter.js'][308]++;
  Rewriter.prototype.tag = (function (i) {
  _$jscoverage['coffee-script/rewriter.js'][309]++;
  var _ref;
  _$jscoverage['coffee-script/rewriter.js'][310]++;
  return (_ref = this.tokens[i]) != null? _ref[0]: void 0;
});
  _$jscoverage['coffee-script/rewriter.js'][313]++;
  return Rewriter;
})();
  _$jscoverage['coffee-script/rewriter.js'][317]++;
  BALANCED_PAIRS = [["(", ")"], ["[", "]"], ["{", "}"], ["INDENT", "OUTDENT"], ["CALL_START", "CALL_END"], ["PARAM_START", "PARAM_END"], ["INDEX_START", "INDEX_END"]];
  _$jscoverage['coffee-script/rewriter.js'][319]++;
  exports.INVERSES = INVERSES = {};
  _$jscoverage['coffee-script/rewriter.js'][321]++;
  EXPRESSION_START = [];
  _$jscoverage['coffee-script/rewriter.js'][323]++;
  EXPRESSION_END = [];
  _$jscoverage['coffee-script/rewriter.js'][325]++;
  for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
    _$jscoverage['coffee-script/rewriter.js'][326]++;
    _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
    _$jscoverage['coffee-script/rewriter.js'][327]++;
    EXPRESSION_START.push(INVERSES[rite] = left);
    _$jscoverage['coffee-script/rewriter.js'][328]++;
    EXPRESSION_END.push(INVERSES[left] = rite);
}
  _$jscoverage['coffee-script/rewriter.js'][331]++;
  EXPRESSION_CLOSE = ["CATCH", "WHEN", "ELSE", "FINALLY"].concat(EXPRESSION_END);
  _$jscoverage['coffee-script/rewriter.js'][333]++;
  IMPLICIT_FUNC = ["IDENTIFIER", "SUPER", ")", "CALL_END", "]", "INDEX_END", "@", "THIS"];
  _$jscoverage['coffee-script/rewriter.js'][335]++;
  IMPLICIT_CALL = ["IDENTIFIER", "NUMBER", "STRING", "JS", "REGEX", "NEW", "PARAM_START", "CLASS", "IF", "TRY", "SWITCH", "THIS", "BOOL", "NULL", "UNDEFINED", "UNARY", "SUPER", "@", "->", "=>", "[", "(", "{", "--", "++"];
  _$jscoverage['coffee-script/rewriter.js'][337]++;
  IMPLICIT_UNSPACED_CALL = ["+", "-"];
  _$jscoverage['coffee-script/rewriter.js'][339]++;
  IMPLICIT_BLOCK = ["->", "=>", "{", "[", ","];
  _$jscoverage['coffee-script/rewriter.js'][341]++;
  IMPLICIT_END = ["POST_IF", "FOR", "WHILE", "UNTIL", "WHEN", "BY", "LOOP", "TERMINATOR"];
  _$jscoverage['coffee-script/rewriter.js'][343]++;
  SINGLE_LINERS = ["ELSE", "->", "=>", "TRY", "FINALLY", "THEN"];
  _$jscoverage['coffee-script/rewriter.js'][345]++;
  SINGLE_CLOSERS = ["TERMINATOR", "CATCH", "FINALLY", "ELSE", "OUTDENT", "LEADING_WHEN"];
  _$jscoverage['coffee-script/rewriter.js'][347]++;
  LINEBREAKS = ["TERMINATOR", "INDENT", "OUTDENT"];
}).call(this);
_$jscoverage['coffee-script/rewriter.js'].source = ["// Generated by CoffeeScript 1.4.0","(function() {","  var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,","    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i &lt; l; i++) { if (i in this &amp;&amp; this[i] === item) return i; } return -1; },","    __slice = [].slice;","","  exports.Rewriter = (function() {","","    function Rewriter() {}","","    Rewriter.prototype.rewrite = function(tokens) {","      this.tokens = tokens;","      this.removeLeadingNewlines();","      this.removeMidExpressionNewlines();","      this.closeOpenCalls();","      this.closeOpenIndexes();","      this.addImplicitIndentation();","      this.tagPostfixConditionals();","      this.addImplicitBraces();","      this.addImplicitParentheses();","      return this.tokens;","    };","","    Rewriter.prototype.scanTokens = function(block) {","      var i, token, tokens;","      tokens = this.tokens;","      i = 0;","      while (token = tokens[i]) {","        i += block.call(this, token, i, tokens);","      }","      return true;","    };","","    Rewriter.prototype.detectEnd = function(i, condition, action) {","      var levels, token, tokens, _ref, _ref1;","      tokens = this.tokens;","      levels = 0;","      while (token = tokens[i]) {","        if (levels === 0 &amp;&amp; condition.call(this, token, i)) {","          return action.call(this, token, i);","        }","        if (!token || levels &lt; 0) {","          return action.call(this, token, i - 1);","        }","        if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) &gt;= 0) {","          levels += 1;","        } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) &gt;= 0) {","          levels -= 1;","        }","        i += 1;","      }","      return i - 1;","    };","","    Rewriter.prototype.removeLeadingNewlines = function() {","      var i, tag, _i, _len, _ref;","      _ref = this.tokens;","      for (i = _i = 0, _len = _ref.length; _i &lt; _len; i = ++_i) {","        tag = _ref[i][0];","        if (tag !== 'TERMINATOR') {","          break;","        }","      }","      if (i) {","        return this.tokens.splice(0, i);","      }","    };","","    Rewriter.prototype.removeMidExpressionNewlines = function() {","      return this.scanTokens(function(token, i, tokens) {","        var _ref;","        if (!(token[0] === 'TERMINATOR' &amp;&amp; (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) &gt;= 0))) {","          return 1;","        }","        tokens.splice(i, 1);","        return 0;","      });","    };","","    Rewriter.prototype.closeOpenCalls = function() {","      var action, condition;","      condition = function(token, i) {","        var _ref;","        return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' &amp;&amp; this.tag(i - 1) === ')';","      };","      action = function(token, i) {","        return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';","      };","      return this.scanTokens(function(token, i) {","        if (token[0] === 'CALL_START') {","          this.detectEnd(i + 1, condition, action);","        }","        return 1;","      });","    };","","    Rewriter.prototype.closeOpenIndexes = function() {","      var action, condition;","      condition = function(token, i) {","        var _ref;","        return (_ref = token[0]) === ']' || _ref === 'INDEX_END';","      };","      action = function(token, i) {","        return token[0] = 'INDEX_END';","      };","      return this.scanTokens(function(token, i) {","        if (token[0] === 'INDEX_START') {","          this.detectEnd(i + 1, condition, action);","        }","        return 1;","      });","    };","","    Rewriter.prototype.addImplicitBraces = function() {","      var action, condition, sameLine, stack, start, startIndent, startIndex, startsLine;","      stack = [];","      start = null;","      startsLine = null;","      sameLine = true;","      startIndent = 0;","      startIndex = 0;","      condition = function(token, i) {","        var one, tag, three, two, _ref, _ref1;","        _ref = this.tokens.slice(i + 1, +(i + 3) + 1 || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];","        if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {","          return false;","        }","        tag = token[0];","        if (__indexOf.call(LINEBREAKS, tag) &gt;= 0) {","          sameLine = false;","        }","        return (((tag === 'TERMINATOR' || tag === 'OUTDENT') || (__indexOf.call(IMPLICIT_END, tag) &gt;= 0 &amp;&amp; sameLine &amp;&amp; !(i - startIndex === 1))) &amp;&amp; ((!startsLine &amp;&amp; this.tag(i - 1) !== ',') || !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' &amp;&amp; (three != null ? three[0] : void 0) === ':'))) || (tag === ',' &amp;&amp; one &amp;&amp; ((_ref1 = one[0]) !== 'IDENTIFIER' &amp;&amp; _ref1 !== 'NUMBER' &amp;&amp; _ref1 !== 'STRING' &amp;&amp; _ref1 !== '@' &amp;&amp; _ref1 !== 'TERMINATOR' &amp;&amp; _ref1 !== 'OUTDENT'));","      };","      action = function(token, i) {","        var tok;","        tok = this.generate('}', '}', token[2]);","        return this.tokens.splice(i, 0, tok);","      };","      return this.scanTokens(function(token, i, tokens) {","        var ago, idx, prevTag, tag, tok, value, _ref, _ref1;","        if (_ref = (tag = token[0]), __indexOf.call(EXPRESSION_START, _ref) &gt;= 0) {","          stack.push([(tag === 'INDENT' &amp;&amp; this.tag(i - 1) === '{' ? '{' : tag), i]);","          return 1;","        }","        if (__indexOf.call(EXPRESSION_END, tag) &gt;= 0) {","          start = stack.pop();","          return 1;","        }","        if (!(tag === ':' &amp;&amp; ((ago = this.tag(i - 2)) === ':' || ((_ref1 = stack[stack.length - 1]) != null ? _ref1[0] : void 0) !== '{'))) {","          return 1;","        }","        sameLine = true;","        startIndex = i + 1;","        stack.push(['{']);","        idx = ago === '@' ? i - 2 : i - 1;","        while (this.tag(idx - 2) === 'HERECOMMENT') {","          idx -= 2;","        }","        prevTag = this.tag(idx - 1);","        startsLine = !prevTag || (__indexOf.call(LINEBREAKS, prevTag) &gt;= 0);","        value = new String('{');","        value.generated = true;","        tok = this.generate('{', value, token[2]);","        tokens.splice(idx, 0, tok);","        this.detectEnd(i + 2, condition, action);","        return 2;","      });","    };","","    Rewriter.prototype.addImplicitParentheses = function() {","      var action, condition, noCall, seenControl, seenSingle;","      noCall = seenSingle = seenControl = false;","      condition = function(token, i) {","        var post, tag, _ref, _ref1;","        tag = token[0];","        if (!seenSingle &amp;&amp; token.fromThen) {","          return true;","        }","        if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '-&gt;' || tag === '=&gt;' || tag === 'CLASS') {","          seenSingle = true;","        }","        if (tag === 'IF' || tag === 'ELSE' || tag === 'SWITCH' || tag === 'TRY' || tag === '=') {","          seenControl = true;","        }","        if ((tag === '.' || tag === '?.' || tag === '::') &amp;&amp; this.tag(i - 1) === 'OUTDENT') {","          return true;","        }","        return !token.generated &amp;&amp; this.tag(i - 1) !== ',' &amp;&amp; (__indexOf.call(IMPLICIT_END, tag) &gt;= 0 || (tag === 'INDENT' &amp;&amp; !seenControl)) &amp;&amp; (tag !== 'INDENT' || (((_ref = this.tag(i - 2)) !== 'CLASS' &amp;&amp; _ref !== 'EXTENDS') &amp;&amp; (_ref1 = this.tag(i - 1), __indexOf.call(IMPLICIT_BLOCK, _ref1) &lt; 0) &amp;&amp; !((post = this.tokens[i + 1]) &amp;&amp; post.generated &amp;&amp; post[0] === '{')));","      };","      action = function(token, i) {","        return this.tokens.splice(i, 0, this.generate('CALL_END', ')', token[2]));","      };","      return this.scanTokens(function(token, i, tokens) {","        var callObject, current, next, prev, tag, _ref, _ref1, _ref2;","        tag = token[0];","        if (tag === 'CLASS' || tag === 'IF' || tag === 'FOR' || tag === 'WHILE') {","          noCall = true;","        }","        _ref = tokens.slice(i - 1, +(i + 1) + 1 || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];","        callObject = !noCall &amp;&amp; tag === 'INDENT' &amp;&amp; next &amp;&amp; next.generated &amp;&amp; next[0] === '{' &amp;&amp; prev &amp;&amp; (_ref1 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref1) &gt;= 0);","        seenSingle = false;","        seenControl = false;","        if (__indexOf.call(LINEBREAKS, tag) &gt;= 0) {","          noCall = false;","        }","        if (prev &amp;&amp; !prev.spaced &amp;&amp; tag === '?') {","          token.call = true;","        }","        if (token.fromThen) {","          return 1;","        }","        if (!(callObject || (prev != null ? prev.spaced : void 0) &amp;&amp; (prev.call || (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) &gt;= 0)) &amp;&amp; (__indexOf.call(IMPLICIT_CALL, tag) &gt;= 0 || !(token.spaced || token.newLine) &amp;&amp; __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) &gt;= 0))) {","          return 1;","        }","        tokens.splice(i, 0, this.generate('CALL_START', '(', token[2]));","        this.detectEnd(i + 1, condition, action);","        if (prev[0] === '?') {","          prev[0] = 'FUNC_EXIST';","        }","        return 2;","      });","    };","","    Rewriter.prototype.addImplicitIndentation = function() {","      var action, condition, indent, outdent, starter;","      starter = indent = outdent = null;","      condition = function(token, i) {","        var _ref;","        return token[1] !== ';' &amp;&amp; (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) &gt;= 0) &amp;&amp; !(token[0] === 'ELSE' &amp;&amp; (starter !== 'IF' &amp;&amp; starter !== 'THEN'));","      };","      action = function(token, i) {","        return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);","      };","      return this.scanTokens(function(token, i, tokens) {","        var tag, _ref, _ref1;","        tag = token[0];","        if (tag === 'TERMINATOR' &amp;&amp; this.tag(i + 1) === 'THEN') {","          tokens.splice(i, 1);","          return 0;","        }","        if (tag === 'ELSE' &amp;&amp; this.tag(i - 1) !== 'OUTDENT') {","          tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation(token))));","          return 2;","        }","        if (tag === 'CATCH' &amp;&amp; ((_ref = this.tag(i + 2)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) {","          tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation(token))));","          return 4;","        }","        if (__indexOf.call(SINGLE_LINERS, tag) &gt;= 0 &amp;&amp; this.tag(i + 1) !== 'INDENT' &amp;&amp; !(tag === 'ELSE' &amp;&amp; this.tag(i + 1) === 'IF')) {","          starter = tag;","          _ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1];","          if (starter === 'THEN') {","            indent.fromThen = true;","          }","          tokens.splice(i + 1, 0, indent);","          this.detectEnd(i + 2, condition, action);","          if (tag === 'THEN') {","            tokens.splice(i, 1);","          }","          return 1;","        }","        return 1;","      });","    };","","    Rewriter.prototype.tagPostfixConditionals = function() {","      var action, condition, original;","      original = null;","      condition = function(token, i) {","        var _ref;","        return (_ref = token[0]) === 'TERMINATOR' || _ref === 'INDENT';","      };","      action = function(token, i) {","        if (token[0] !== 'INDENT' || (token.generated &amp;&amp; !token.fromThen)) {","          return original[0] = 'POST_' + original[0];","        }","      };","      return this.scanTokens(function(token, i) {","        if (token[0] !== 'IF') {","          return 1;","        }","        original = token;","        this.detectEnd(i + 1, condition, action);","        return 1;","      });","    };","","    Rewriter.prototype.indentation = function(token, implicit) {","      var indent, outdent;","      if (implicit == null) {","        implicit = false;","      }","      indent = ['INDENT', 2, token[2]];","      outdent = ['OUTDENT', 2, token[2]];","      if (implicit) {","        indent.generated = outdent.generated = true;","      }","      return [indent, outdent];","    };","","    Rewriter.prototype.generate = function(tag, value, line) {","      var tok;","      tok = [tag, value, line];","      tok.generated = true;","      return tok;","    };","","    Rewriter.prototype.tag = function(i) {","      var _ref;","      return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;","    };","","    return Rewriter;","","  })();","","  BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];","","  exports.INVERSES = INVERSES = {};","","  EXPRESSION_START = [];","","  EXPRESSION_END = [];","","  for (_i = 0, _len = BALANCED_PAIRS.length; _i &lt; _len; _i++) {","    _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];","    EXPRESSION_START.push(INVERSES[rite] = left);","    EXPRESSION_END.push(INVERSES[left] = rite);","  }","","  EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);","","  IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];","","  IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', '@', '-&gt;', '=&gt;', '[', '(', '{', '--', '++'];","","  IMPLICIT_UNSPACED_CALL = ['+', '-'];","","  IMPLICIT_BLOCK = ['-&gt;', '=&gt;', '{', '[', ','];","","  IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];","","  SINGLE_LINERS = ['ELSE', '-&gt;', '=&gt;', 'TRY', 'FINALLY', 'THEN'];","","  SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];","","  LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];","","}).call(this);"];
