code: function findStartLine(n) {
        var minindent, minline;
        for (var search = n, lim = n - 40; search > lim; --search) {
          if (search == 0) return 0;
          var line = getLine(search-1);
          if (line.stateAfter) return search;
          var indented = line.indentation(options.tabSize);
          if (minline == null || minindent > indented) {
            minline = search - 1;
            minindent = indented;
          }
        }
        return minline;
      }
docs: Finds the line to start with when starting a parse. Tries to find a line with a stateAfter, so that it can start with a valid state. If that fails, it returns the line with the smallest indentation, which tends to need the least context to parse correctly.