src/vs/workbench/contrib/tasks/common/taskConfiguration.ts/addResult
	export function from(this: void, config: ProblemMatcherConfig.ProblemMatcherType | undefined, context: IParseContext): TaskConfigurationValueWithErrors<ProblemMatcher[]> {
		const result: ProblemMatcher[] = [];
		if (config === undefined) {
			return { value: result };
		}
		const errors: string[] = [];
		function addResult(matcher: TaskConfigurationValueWithErrors<ProblemMatcher>) {
			if (matcher.value) {
				result.push(matcher.value);
			}
			if (matcher.errors) {
				errors.push(...matcher.errors);
			}
		}
		const kind = getProblemMatcherKind(config);
		if (kind === ProblemMatcherKind.Unknown) {
			const error = nls.localize(
				'ConfigurationParser.unknownMatcherKind',
				'Warning: the defined problem matcher is unknown. Supported types are string | ProblemMatcher | Array<string | ProblemMatcher>.\n{0}\n',
				JSON.stringify(config, null, 4));
			context.problemReporter.warn(error);
		} else if (kind === ProblemMatcherKind.String || kind === ProblemMatcherKind.ProblemMatcher) {
			addResult(resolveProblemMatcher(config as ProblemMatcherConfig.ProblemMatcher, context));
		} else if (kind === ProblemMatcherKind.Array) {
			const problemMatchers = <(string | ProblemMatcherConfig.ProblemMatcher)[]>config;
			problemMatchers.forEach(problemMatcher => {
				addResult(resolveProblemMatcher(problemMatcher, context));
			});
		}
		return { value: result, errors };
	}