src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts/parseQuery
export function parseQuery(query: string): IParsedQuery {
	const tags: string[] = [];
	const extensions: string[] = [];
	const features: string[] = [];
	const ids: string[] = [];
	query = query.replace(tagRegex, (_, __, quotedTag, tag) => {
		tags.push(tag || quotedTag);
		return '';
	});

	query = query.replace(`@${MODIFIED_SETTING_TAG}`, () => {
		tags.push(MODIFIED_SETTING_TAG);
		return '';
	});

	query = query.replace(extensionRegex, (_, __, quotedExtensionId, extensionId) => {
		const extensionIdQuery: string = extensionId || quotedExtensionId;
		if (extensionIdQuery) {
			extensions.push(...extensionIdQuery.split(',').map(s => s.trim()).filter(s => !isFalsyOrWhitespace(s)));
		}
		return '';
	});

	query = query.replace(featureRegex, (_, __, quotedFeature, feature) => {
		const featureQuery: string = feature || quotedFeature;
		if (featureQuery) {
			features.push(...featureQuery.split(',').map(s => s.trim()).filter(s => !isFalsyOrWhitespace(s)));
		}
		return '';
	});

	query = query.replace(idRegex, (_, __, quotedId, id) => {
		const idRegex: string = id || quotedId;
		if (idRegex) {
			ids.push(...idRegex.split(',').map(s => s.trim()).filter(s => !isFalsyOrWhitespace(s)));
		}
		return '';
	});

	query = query.trim();

	return {
		tags,
		extensionFilters: extensions,
		featureFilters: features,
		idFilters: ids,
		query
	};
}