function indentBefore(start, state) {
  var end = start;
  start = start - 1;

  while (start > 0 && state.g.source[start] != '\n') {
    if (!state.g.source[start].match(/[ \t]/)) {
      end = start;
    }
    start--;
  }
  return state.g.source.substring(start + 1, end);
}
Calculates indent from the beginning of the line until "start" or the first
character before start.
@example
  "  foo.bar()"
        ^
      start
  indent will be "  "

@param  {number} start
@param  {object} state
@return {string}