function getNodeReportLocations(matches) {
				if (
					!astUtils.isStaticTemplateLiteral(node) &&
					node.type !== "Literal"
				) {
					return matches.length ? [node.loc] : [];
				}
				return matches.map(chars => {
					const firstIndex = chars[0].start;
					const lastIndex = chars.at(-1).end - 1;
					let start;
					let end;

					if (node.type === "TemplateLiteral") {
						const source = sourceCode.getText(node);
						const offset = node.range[0];

						codeUnits ??= parseTemplateToken(source);
						start = offset + codeUnits[firstIndex].start;
						end = offset + codeUnits[lastIndex].end;
					} else if (typeof node.value === "string") {
						// String Literal
						const source = node.raw;
						const offset = node.range[0];

						codeUnits ??= parseStringLiteral(source);
						start = offset + codeUnits[firstIndex].start;
						end = offset + codeUnits[lastIndex].end;
					} else {
						// RegExp Literal
						const offset = node.range[0] + 1; // Add 1 to skip the leading slash.

						start = offset + firstIndex;
						end = offset + lastIndex + 1;
					}

					return {
						start: sourceCode.getLocFromIndex(start),
						end: sourceCode.getLocFromIndex(end),
					};
				});
			}
Finds the report loc(s) for a range of matches.
Only literals and expression-less templates generate granular errors.
@param {Character[][]} matches Lists of individual characters being reported on.
@returns {Location[]} locs for context.report.
@see https://github.com/eslint/eslint/pull/17515