Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/error.dart |
| diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart |
| index 005f8c6c4ab85f4b373bf9edbe2b3f918ca701a4..3d0814a82f05030e4acbb1971ccd5bbc83e701c4 100644 |
| --- a/pkg/analyzer/lib/src/generated/error.dart |
| +++ b/pkg/analyzer/lib/src/generated/error.dart |
| @@ -191,6 +191,18 @@ class AnalysisError { |
| buffer.write(_message); |
| return buffer.toString(); |
| } |
| + |
| + /** |
| + * Merge all of the errors in the lists in the given list of [errorLists] into |
| + * a single list of errors. |
| + */ |
| + static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { |
| + List<AnalysisError> errors = <AnalysisError>[]; |
| + for (List<AnalysisError> errorList in errorLists) { |
| + errors.addAll(errorList); |
| + } |
| + return errors; |
|
scheglov
2015/05/07 18:11:38
It could be also implemented as:
errorLists.expan
Brian Wilkerson
2015/05/07 18:30:07
I think I'll leave it, then.
|
| + } |
| } |
| /** |