function groupByParentDirective(directives) {
	const groups = new Map();

	for (const directive of directives) {
		const {
			unprocessedDirective: { parentDirective },
		} = directive;

		if (groups.has(parentDirective)) {
			groups.get(parentDirective).push(directive);
		} else {
			groups.set(parentDirective, [directive]);
		}
	}

	return [...groups.values()];
}
Groups a set of directives into sub-arrays by their parent comment.
@param {Iterable<Directive>} directives Unused directives to be removed.
@returns {Directive[][]} Directives grouped by their parent comment.