OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.error.error; | 5 library analyzer.error.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/error/listener.dart'; | 9 import 'package:analyzer/error/listener.dart'; |
10 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; | 10 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 ParserErrorCode.VAR_TYPEDEF, | 461 ParserErrorCode.VAR_TYPEDEF, |
462 ParserErrorCode.VOID_PARAMETER, | 462 ParserErrorCode.VOID_PARAMETER, |
463 ParserErrorCode.VOID_VARIABLE, | 463 ParserErrorCode.VOID_VARIABLE, |
464 ParserErrorCode.WITH_BEFORE_EXTENDS, | 464 ParserErrorCode.WITH_BEFORE_EXTENDS, |
465 ParserErrorCode.WITH_WITHOUT_EXTENDS, | 465 ParserErrorCode.WITH_WITHOUT_EXTENDS, |
466 ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, | 466 ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER, |
467 ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, | 467 ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP, |
468 ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER, | 468 ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER, |
469 ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH, | 469 ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH, |
470 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART, | 470 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART, |
| 471 ScannerErrorCode.EXPECTED_TOKEN, |
471 ScannerErrorCode.ILLEGAL_CHARACTER, | 472 ScannerErrorCode.ILLEGAL_CHARACTER, |
472 ScannerErrorCode.MISSING_DIGIT, | 473 ScannerErrorCode.MISSING_DIGIT, |
473 ScannerErrorCode.MISSING_HEX_DIGIT, | 474 ScannerErrorCode.MISSING_HEX_DIGIT, |
| 475 ScannerErrorCode.MISSING_IDENTIFIER, |
474 ScannerErrorCode.MISSING_QUOTE, | 476 ScannerErrorCode.MISSING_QUOTE, |
475 ScannerErrorCode.UNABLE_GET_CONTENT, | 477 ScannerErrorCode.UNABLE_GET_CONTENT, |
476 ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT, | 478 ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT, |
477 ScannerErrorCode.UNTERMINATED_STRING_LITERAL, | 479 ScannerErrorCode.UNTERMINATED_STRING_LITERAL, |
478 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, | 480 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, |
479 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, | 481 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, |
480 StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, | 482 StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE, |
481 StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE, | 483 StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE, |
482 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, | 484 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, |
483 StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, | 485 StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 * a single list of errors. | 844 * a single list of errors. |
843 */ | 845 */ |
844 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { | 846 static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) { |
845 Set<AnalysisError> errors = new HashSet<AnalysisError>(); | 847 Set<AnalysisError> errors = new HashSet<AnalysisError>(); |
846 for (List<AnalysisError> errorList in errorLists) { | 848 for (List<AnalysisError> errorList in errorLists) { |
847 errors.addAll(errorList); | 849 errors.addAll(errorList); |
848 } | 850 } |
849 return errors.toList(); | 851 return errors.toList(); |
850 } | 852 } |
851 } | 853 } |
OLD | NEW |