src/vs/workbench/services/textMate/common/TMHelper.ts/findMatchingThemeRule
export function findMatchingThemeRule(theme: IColorTheme, scopes: string[], onlyColorRules: boolean = true): ThemeRule | null {
	for (let i = scopes.length - 1; i >= 0; i--) {
		let parentScopes = scopes.slice(0, i);
		let scope = scopes[i];
		let r = findMatchingThemeRule2(theme, scope, parentScopes, onlyColorRules);
		if (r) {
			return r;
		}
	}
	return null;
}