code: function getLineInfo(input, offset) {
    for (var line = 0, cur = 0;;) {
      _whitespace.lineBreakG.lastIndex = cur;
      var match = _whitespace.lineBreakG.exec(input);
      if (match && match.index < offset) {
        ++line;
        cur = match.index + match[0].length;
      } else {
        return new Position(line, offset - cur);
      }
    }
  }
docs: The `getLineInfo` function is mostly useful when the `locations` option is off (for performance reasons) and you want to find the line/column position for a given character offset. `input` should be the code string that the offset refers into.