function findOffsets(text, offset) {
	let lineOffset = 0;
	let columnOffset = 0;

	for (let i = 0; i < offset; i++) {
		if (text[i] === "\n") {
			lineOffset++;
			columnOffset = 0;
		} else {
			columnOffset++;
		}
	}

	return {
		lineOffset,
		columnOffset,
	};
}
Finds the line and column offsets for a given offset in a string.
@param {string} text The text to search.
@param {number} offset The offset to find.
@returns {{lineOffset:number,columnOffset:number}} The location of the offset.
     Note that `columnOffset` should be used as an offset to the column number
     of the given text in the source code only when `lineOffset` is 0.
     Otherwise, it should be used as a 0-based column number in the source code.