async function replace_in_code(regex, get_replacement, location) {
	const replacements = await calculate_replacements(regex, get_replacement, location.source);
	return perform_replacements(replacements, location);
}
@param {RegExp} regex
@param {(...match: any[]) => Promise<MappedCode>} get_replacement
@param {Source} location
@returns {Promise<MappedCode>}