function getIndexFromLoc(loc) {
			const lineStartIndex = lineStartIndices[loc.line - 1];
			const positionIndex = lineStartIndex + loc.column - 1;

			return positionIndex;
		}
Converts a (line, column) pair into a range index.
@param {Object} loc A line/column location
@param {number} loc.line The line number of the location (1-indexed)
@param {number} loc.column The column number of the location (1-indexed)
@returns {number} The range index of the location in the file.
Copied from SourceCode#getIndexFromLoc