Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: pkg/analyzer/lib/error/error.dart

Issue 2486873003: Move scanner into pkg/front_end/lib/src/scanner. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/error/listener.dart'; 10 import 'package:analyzer/error/listener.dart';
11 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; 11 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
12 import 'package:analyzer/src/error/codes.dart'; 12 import 'package:analyzer/src/error/codes.dart';
13 import 'package:analyzer/src/generated/java_core.dart'; 13 import 'package:analyzer/src/generated/java_core.dart';
14 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 14 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
15 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
16 import 'package:front_end/src/scanner/errors.dart';
17
18 export 'package:front_end/src/scanner/errors.dart'
19 show ErrorCode, ErrorSeverity, ErrorType;
20
21 const List<ErrorCode> errorCodeValues = const [
22 //
23 // Manually generated. You can mostly reproduce this list by running the
24 // following command from the root of the analyzer package:
25 //
26 // > cat
27 // lib/src/analysis_options/error/option_codes.dart';
28 // lib/src/dart/error/hint_codes.dart';
29 // lib/src/dart/error/lint_codes.dart';
30 // lib/src/dart/error/todo_codes.dart';
31 // lib/src/html/error/html_codes.dart';
32 // lib/src/dart/error/syntactic_errors.dart
33 // lib/src/error/codes.dart |
Brian Wilkerson 2016/11/08 20:53:23 Can you update this to include the new location fo
Paul Berry 2016/11/08 21:47:06 Done.
34 // grep 'static const .*Code' |
35 // awk '{print $3"."$4","}' |
36 // sort > codes.txt
37 //
38 // There are a few error codes that are wrapped such that the name of the
39 // error code in on the line following the pattern we're grepping for. Those
40 // need to be filled in by hand.
41 //
42 AnalysisOptionsErrorCode.PARSE_ERROR,
43 AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE,
44 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE,
45 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
46 AnalysisOptionsWarningCode.UNSUPPORTED_VALUE,
47 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
48 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
49 CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
50 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
51 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
52 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
53 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
54 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
55 CompileTimeErrorCode.AMBIGUOUS_EXPORT,
56 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
57 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
58 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT,
59 CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT,
60 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE,
61 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
62 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
63 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
64 CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
65 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
66 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
67 CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD,
68 CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER,
69 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
70 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
71 CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
72 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
73 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN,
74 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
75 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
76 CompileTimeErrorCode.CONST_DEFERRED_CLASS,
77 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
78 CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE,
79 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
80 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING,
81 CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
82 CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
83 CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
84 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
85 CompileTimeErrorCode
86 .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
87 CompileTimeErrorCode.CONST_INSTANCE_FIELD,
88 CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
89 CompileTimeErrorCode.CONST_NOT_INITIALIZED,
90 CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS,
91 CompileTimeErrorCode.CONST_WITH_NON_CONST,
92 CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
93 CompileTimeErrorCode.CONST_WITH_NON_TYPE,
94 CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
95 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR,
96 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
97 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
98 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
99 CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR,
100 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
101 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
102 CompileTimeErrorCode.DUPLICATE_DEFINITION,
103 CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE,
104 CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT,
105 CompileTimeErrorCode.DUPLICATE_PART,
106 CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
107 CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
108 CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS,
109 CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
110 CompileTimeErrorCode.EXTENDS_ENUM,
111 CompileTimeErrorCode.EXTENDS_NON_CLASS,
112 CompileTimeErrorCode.EXTRA_ARGUMENT_TO_ASSERT,
113 CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
114 CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
115 CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER,
116 CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR,
117 CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
118 CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
119 CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
120 CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME,
121 CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
122 CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
123 CompileTimeErrorCode.IMPLEMENTS_DYNAMIC,
124 CompileTimeErrorCode.IMPLEMENTS_ENUM,
125 CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
126 CompileTimeErrorCode.IMPLEMENTS_REPEATED,
127 CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
128 CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
129 CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
130 CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY,
131 CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
132 CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD,
133 CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD,
134 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD,
135 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD,
136 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY,
137 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC,
138 CompileTimeErrorCode.INSTANTIATE_ENUM,
139 CompileTimeErrorCode.INVALID_ANNOTATION,
140 CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY,
141 CompileTimeErrorCode.INVALID_CONSTANT,
142 CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME,
143 CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS,
144 CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC,
145 CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR,
146 CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
147 CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS,
148 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
149 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
150 CompileTimeErrorCode.INVALID_URI,
151 CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
152 CompileTimeErrorCode.LABEL_UNDEFINED,
153 CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
154 CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME,
155 CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
156 CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
157 CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
158 CompileTimeErrorCode.MIXIN_DEFERRED_CLASS,
159 CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
160 CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT,
161 CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
162 CompileTimeErrorCode.MIXIN_OF_ENUM,
163 CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
164 CompileTimeErrorCode.MIXIN_REFERENCES_SUPER,
165 CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS,
166 CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
167 CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
168 CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
169 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION,
170 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY,
171 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
172 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
173 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT,
174 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
175 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
176 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
177 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
178 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
179 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
180 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
181 CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
182 CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
183 CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
184 CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS,
185 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
186 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
187 CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
188 CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
189 CompileTimeErrorCode.PART_OF_NON_PART,
190 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
191 CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
192 CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER,
193 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
194 CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
195 CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
196 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
197 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
198 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS,
199 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH,
200 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR,
201 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR,
202 CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
203 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS,
204 CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR,
205 CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION,
206 CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH,
207 CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR,
208 CompileTimeErrorCode.RETURN_IN_GENERATOR,
209 CompileTimeErrorCode.SHARED_DEFERRED_PREFIX,
210 CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT,
211 CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT,
212 CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
213 CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
214 CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
215 CompileTimeErrorCode.UNDEFINED_CLASS,
216 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER,
217 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
218 CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER,
219 CompileTimeErrorCode.URI_DOES_NOT_EXIST,
220 CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED,
221 CompileTimeErrorCode.URI_WITH_INTERPOLATION,
222 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
223 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
224 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
225 CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR,
226 CompileTimeErrorCode.YIELD_IN_NON_GENERATOR,
227 HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
228 HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
229 HintCode.CAN_BE_NULL_AFTER_NULL_AWARE,
230 HintCode.DEAD_CODE,
231 HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH,
232 HintCode.DEAD_CODE_ON_CATCH_SUBTYPE,
233 HintCode.DEPRECATED_MEMBER_USE,
234 HintCode.DIVISION_OPTIMIZATION,
235 HintCode.DUPLICATE_IMPORT,
236 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
237 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
238 HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
239 HintCode.INVALID_ASSIGNMENT,
240 HintCode.INVALID_FACTORY_ANNOTATION,
241 HintCode.INVALID_FACTORY_METHOD_DECL,
242 HintCode.INVALID_FACTORY_METHOD_IMPL,
243 HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
244 HintCode.IS_DOUBLE,
245 HintCode.IS_INT,
246 HintCode.IS_NOT_DOUBLE,
247 HintCode.IS_NOT_INT,
248 HintCode.MISSING_JS_LIB_ANNOTATION,
249 HintCode.MISSING_REQUIRED_PARAM,
250 HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS,
251 HintCode.MISSING_RETURN,
252 HintCode.MUST_CALL_SUPER,
253 HintCode.NULL_AWARE_IN_CONDITION,
254 HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE,
255 HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD,
256 HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER,
257 HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD,
258 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
259 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
260 HintCode.TYPE_CHECK_IS_NOT_NULL,
261 HintCode.TYPE_CHECK_IS_NULL,
262 HintCode.UNDEFINED_GETTER,
263 HintCode.UNDEFINED_HIDDEN_NAME,
264 HintCode.UNDEFINED_METHOD,
265 HintCode.UNDEFINED_OPERATOR,
266 HintCode.UNDEFINED_SETTER,
267 HintCode.UNDEFINED_SHOWN_NAME,
268 HintCode.UNNECESSARY_CAST,
269 HintCode.UNNECESSARY_NO_SUCH_METHOD,
270 HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
271 HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
272 HintCode.UNUSED_CATCH_CLAUSE,
273 HintCode.UNUSED_CATCH_STACK,
274 HintCode.UNUSED_ELEMENT,
275 HintCode.UNUSED_FIELD,
276 HintCode.UNUSED_IMPORT,
277 HintCode.UNUSED_LOCAL_VARIABLE,
278 HintCode.UNUSED_SHOWN_NAME,
279 HintCode.USE_OF_VOID_RESULT,
280 HtmlErrorCode.PARSE_ERROR,
281 HtmlWarningCode.INVALID_URI,
282 HtmlWarningCode.URI_DOES_NOT_EXIST,
283 ParserErrorCode.ABSTRACT_CLASS_MEMBER,
284 ParserErrorCode.ABSTRACT_ENUM,
285 ParserErrorCode.ABSTRACT_STATIC_METHOD,
286 ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION,
287 ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE,
288 ParserErrorCode.ABSTRACT_TYPEDEF,
289 ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT,
290 ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
291 ParserErrorCode.BREAK_OUTSIDE_OF_LOOP,
292 ParserErrorCode.CLASS_IN_CLASS,
293 ParserErrorCode.COLON_IN_PLACE_OF_IN,
294 ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE,
295 ParserErrorCode.CONST_AND_FINAL,
296 ParserErrorCode.CONST_AND_VAR,
297 ParserErrorCode.CONST_CLASS,
298 ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY,
299 ParserErrorCode.CONST_ENUM,
300 ParserErrorCode.CONST_FACTORY,
301 ParserErrorCode.CONST_METHOD,
302 ParserErrorCode.CONST_TYPEDEF,
303 ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP,
304 ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
305 ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS,
306 ParserErrorCode.DIRECTIVE_AFTER_DECLARATION,
307 ParserErrorCode.DUPLICATED_MODIFIER,
308 ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
309 ParserErrorCode.EMPTY_ENUM_BODY,
310 ParserErrorCode.ENUM_IN_CLASS,
311 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
312 ParserErrorCode.EXPECTED_CASE_OR_DEFAULT,
313 ParserErrorCode.EXPECTED_CLASS_MEMBER,
314 ParserErrorCode.EXPECTED_EXECUTABLE,
315 ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL,
316 ParserErrorCode.EXPECTED_STRING_LITERAL,
317 ParserErrorCode.EXPECTED_TOKEN,
318 ParserErrorCode.EXPECTED_TYPE_NAME,
319 ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
320 ParserErrorCode.EXTERNAL_AFTER_CONST,
321 ParserErrorCode.EXTERNAL_AFTER_FACTORY,
322 ParserErrorCode.EXTERNAL_AFTER_STATIC,
323 ParserErrorCode.EXTERNAL_CLASS,
324 ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY,
325 ParserErrorCode.EXTERNAL_ENUM,
326 ParserErrorCode.EXTERNAL_FIELD,
327 ParserErrorCode.EXTERNAL_GETTER_WITH_BODY,
328 ParserErrorCode.EXTERNAL_METHOD_WITH_BODY,
329 ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY,
330 ParserErrorCode.EXTERNAL_SETTER_WITH_BODY,
331 ParserErrorCode.EXTERNAL_TYPEDEF,
332 ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION,
333 ParserErrorCode.FACTORY_WITHOUT_BODY,
334 ParserErrorCode.FACTORY_WITH_INITIALIZERS,
335 ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
336 ParserErrorCode.FINAL_AND_VAR,
337 ParserErrorCode.FINAL_CLASS,
338 ParserErrorCode.FINAL_CONSTRUCTOR,
339 ParserErrorCode.FINAL_ENUM,
340 ParserErrorCode.FINAL_METHOD,
341 ParserErrorCode.FINAL_TYPEDEF,
342 ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR,
343 ParserErrorCode.GETTER_IN_FUNCTION,
344 ParserErrorCode.GETTER_WITH_PARAMETERS,
345 ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
346 ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS,
347 ParserErrorCode.IMPLEMENTS_BEFORE_WITH,
348 ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
349 ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH,
350 ParserErrorCode.INVALID_AWAIT_IN_FOR,
351 ParserErrorCode.INVALID_CODE_POINT,
352 ParserErrorCode.INVALID_COMMENT_REFERENCE,
353 ParserErrorCode.INVALID_HEX_ESCAPE,
354 ParserErrorCode.INVALID_LITERAL_IN_CONFIGURATION,
355 ParserErrorCode.INVALID_OPERATOR,
356 ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
357 ParserErrorCode.INVALID_STAR_AFTER_ASYNC,
358 ParserErrorCode.INVALID_SYNC,
359 ParserErrorCode.INVALID_UNICODE_ESCAPE,
360 ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST,
361 ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER,
362 ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
363 ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER,
364 ParserErrorCode.MISSING_CATCH_OR_FINALLY,
365 ParserErrorCode.MISSING_CLASS_BODY,
366 ParserErrorCode.MISSING_CLOSING_PARENTHESIS,
367 ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
368 ParserErrorCode.MISSING_ENUM_BODY,
369 ParserErrorCode.MISSING_EXPRESSION_IN_INITIALIZER,
370 ParserErrorCode.MISSING_EXPRESSION_IN_THROW,
371 ParserErrorCode.MISSING_FUNCTION_BODY,
372 ParserErrorCode.MISSING_FUNCTION_PARAMETERS,
373 ParserErrorCode.MISSING_GET,
374 ParserErrorCode.MISSING_IDENTIFIER,
375 ParserErrorCode.MISSING_INITIALIZER,
376 ParserErrorCode.MISSING_KEYWORD_OPERATOR,
377 ParserErrorCode.MISSING_METHOD_PARAMETERS,
378 ParserErrorCode.MISSING_NAME_IN_LIBRARY_DIRECTIVE,
379 ParserErrorCode.MISSING_NAME_IN_PART_OF_DIRECTIVE,
380 ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT,
381 ParserErrorCode.MISSING_STAR_AFTER_SYNC,
382 ParserErrorCode.MISSING_STATEMENT,
383 ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP,
384 ParserErrorCode.MISSING_TYPEDEF_PARAMETERS,
385 ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH,
386 ParserErrorCode.MIXED_PARAMETER_GROUPS,
387 ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES,
388 ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES,
389 ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES,
390 ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS,
391 ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES,
392 ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS,
393 ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH,
394 ParserErrorCode.MULTIPLE_WITH_CLAUSES,
395 ParserErrorCode.NAMED_FUNCTION_EXPRESSION,
396 ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP,
397 ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE,
398 ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE,
399 ParserErrorCode.NON_CONSTRUCTOR_FACTORY,
400 ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME,
401 ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART,
402 ParserErrorCode.NON_STRING_LITERAL_AS_URI,
403 ParserErrorCode.NON_USER_DEFINABLE_OPERATOR,
404 ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS,
405 ParserErrorCode.NULLABLE_TYPE_IN_EXTENDS,
406 ParserErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS,
407 ParserErrorCode.NULLABLE_TYPE_IN_WITH,
408 ParserErrorCode.NULLABLE_TYPE_PARAMETER,
409 ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT,
410 ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP,
411 ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY,
412 ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR,
413 ParserErrorCode.SETTER_IN_FUNCTION,
414 ParserErrorCode.STATIC_AFTER_CONST,
415 ParserErrorCode.STATIC_AFTER_FINAL,
416 ParserErrorCode.STATIC_AFTER_VAR,
417 ParserErrorCode.STATIC_CONSTRUCTOR,
418 ParserErrorCode.STATIC_GETTER_WITHOUT_BODY,
419 ParserErrorCode.STATIC_OPERATOR,
420 ParserErrorCode.STATIC_SETTER_WITHOUT_BODY,
421 ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION,
422 ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
423 ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
424 ParserErrorCode.TOP_LEVEL_OPERATOR,
425 ParserErrorCode.TYPEDEF_IN_CLASS,
426 ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP,
427 ParserErrorCode.UNEXPECTED_TOKEN,
428 ParserErrorCode.VAR_AND_TYPE,
429 ParserErrorCode.VAR_AS_TYPE_NAME,
430 ParserErrorCode.VAR_CLASS,
431 ParserErrorCode.VAR_ENUM,
432 ParserErrorCode.VAR_RETURN_TYPE,
433 ParserErrorCode.VAR_TYPEDEF,
434 ParserErrorCode.VOID_PARAMETER,
435 ParserErrorCode.VOID_VARIABLE,
436 ParserErrorCode.WITH_BEFORE_EXTENDS,
437 ParserErrorCode.WITH_WITHOUT_EXTENDS,
438 ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER,
439 ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP,
440 ScannerErrorCode.ILLEGAL_CHARACTER,
441 ScannerErrorCode.MISSING_DIGIT,
442 ScannerErrorCode.MISSING_HEX_DIGIT,
443 ScannerErrorCode.MISSING_QUOTE,
444 ScannerErrorCode.UNABLE_GET_CONTENT,
445 ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT,
446 ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
447 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
448 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
449 StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
450 StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
451 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
452 StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
453 StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
454 StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE,
455 StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
456 StaticTypeWarningCode.INVALID_ASSIGNMENT,
457 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
458 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
459 StaticTypeWarningCode.NON_BOOL_CONDITION,
460 StaticTypeWarningCode.NON_BOOL_EXPRESSION,
461 StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION,
462 StaticTypeWarningCode.NON_BOOL_OPERAND,
463 StaticTypeWarningCode.NON_NULLABLE_FIELD_NOT_INITIALIZED,
464 StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT,
465 StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
466 StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
467 StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
468 StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT,
469 StaticTypeWarningCode.UNDEFINED_FUNCTION,
470 StaticTypeWarningCode.UNDEFINED_GETTER,
471 StaticTypeWarningCode.UNDEFINED_METHOD,
472 StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR,
473 StaticTypeWarningCode.UNDEFINED_OPERATOR,
474 StaticTypeWarningCode.UNDEFINED_SETTER,
475 StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
476 StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
477 StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
478 StaticTypeWarningCode.UNDEFINED_SUPER_SETTER,
479 StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
480 StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
Brian Wilkerson 2016/11/08 20:53:23 Unfortunately, it looks like this file was changed
Paul Berry 2016/11/08 21:47:06 Thanks for the heads up. I manually merged in the
481 StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
482 StaticWarningCode.AMBIGUOUS_IMPORT,
483 StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
484 StaticWarningCode.ASSIGNMENT_TO_CONST,
485 StaticWarningCode.ASSIGNMENT_TO_FINAL,
486 StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
487 StaticWarningCode.ASSIGNMENT_TO_FUNCTION,
488 StaticWarningCode.ASSIGNMENT_TO_METHOD,
489 StaticWarningCode.ASSIGNMENT_TO_TYPE,
490 StaticWarningCode.CASE_BLOCK_NOT_TERMINATED,
491 StaticWarningCode.CAST_TO_NON_TYPE,
492 StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
493 StaticWarningCode.CONFLICTING_DART_IMPORT,
494 StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
495 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER,
496 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2,
497 StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
498 StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
499 StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
500 StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
501 StaticWarningCode.EQUAL_KEYS_IN_MAP,
502 StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
503 StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
504 StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
505 StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
506 StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
507 StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
508 StaticWarningCode.FINAL_NOT_INITIALIZED,
509 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
510 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
511 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
512 StaticWarningCode.FUNCTION_WITHOUT_CALL,
513 StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
514 StaticWarningCode.IMPORT_OF_NON_LIBRARY,
515 StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD,
516 StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC,
517 StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE,
518 StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE,
519 StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE,
520 StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE,
521 StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE,
522 StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS,
523 StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND,
524 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
525 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
526 StaticWarningCode.INVALID_OVERRIDE_NAMED,
527 StaticWarningCode.INVALID_OVERRIDE_POSITIONAL,
528 StaticWarningCode.INVALID_OVERRIDE_REQUIRED,
529 StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
530 StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
531 StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
532 StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
533 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
534 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,
535 StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
536 StaticWarningCode.MIXED_RETURN_TYPES,
537 StaticWarningCode.NEW_WITH_ABSTRACT_CLASS,
538 StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS,
539 StaticWarningCode.NEW_WITH_NON_TYPE,
540 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
541 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
542 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
543 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
544 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
545 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
546 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
547 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE,
548 StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR,
549 StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
550 StaticWarningCode.NOT_A_TYPE,
551 StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
552 StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
553 StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
554 StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE,
555 StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
556 StaticWarningCode.REDIRECT_TO_NON_CLASS,
557 StaticWarningCode.RETURN_WITHOUT_VALUE,
558 StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
559 StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
560 StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS,
561 StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
562 StaticWarningCode.TYPE_TEST_WITH_NON_TYPE,
563 StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME,
564 StaticWarningCode.UNDEFINED_CLASS,
565 StaticWarningCode.UNDEFINED_CLASS_BOOLEAN,
566 StaticWarningCode.UNDEFINED_GETTER,
567 StaticWarningCode.UNDEFINED_IDENTIFIER,
568 StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT,
569 StaticWarningCode.UNDEFINED_NAMED_PARAMETER,
570 StaticWarningCode.UNDEFINED_SETTER,
571 StaticWarningCode.UNDEFINED_STATIC_METHOD_OR_GETTER,
572 StaticWarningCode.UNDEFINED_SUPER_GETTER,
573 StaticWarningCode.UNDEFINED_SUPER_SETTER,
574 StaticWarningCode.VOID_RETURN_FOR_GETTER,
575 StrongModeCode.ASSIGNMENT_CAST,
576 StrongModeCode.COULD_NOT_INFER,
577 StrongModeCode.DOWN_CAST_COMPOSITE,
578 StrongModeCode.DOWN_CAST_IMPLICIT,
579 StrongModeCode.DOWN_CAST_IMPLICIT_ASSIGN,
580 StrongModeCode.DYNAMIC_CAST,
581 StrongModeCode.DYNAMIC_INVOKE,
582 StrongModeCode.IMPLICIT_DYNAMIC_FIELD,
583 StrongModeCode.IMPLICIT_DYNAMIC_FUNCTION,
584 StrongModeCode.IMPLICIT_DYNAMIC_INVOKE,
585 StrongModeCode.IMPLICIT_DYNAMIC_LIST_LITERAL,
586 StrongModeCode.IMPLICIT_DYNAMIC_MAP_LITERAL,
587 StrongModeCode.IMPLICIT_DYNAMIC_METHOD,
588 StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER,
589 StrongModeCode.IMPLICIT_DYNAMIC_RETURN,
590 StrongModeCode.IMPLICIT_DYNAMIC_TYPE,
591 StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE,
592 StrongModeCode.INFERRED_TYPE,
593 StrongModeCode.INFERRED_TYPE_ALLOCATION,
594 StrongModeCode.INFERRED_TYPE_CLOSURE,
595 StrongModeCode.INFERRED_TYPE_LITERAL,
596 StrongModeCode.INVALID_CAST_LITERAL,
597 StrongModeCode.INVALID_CAST_LITERAL_LIST,
598 StrongModeCode.INVALID_CAST_LITERAL_MAP,
599 StrongModeCode.INVALID_CAST_FUNCTION_EXPR,
600 StrongModeCode.INVALID_CAST_NEW_EXPR,
601 StrongModeCode.INVALID_CAST_METHOD,
602 StrongModeCode.INVALID_CAST_FUNCTION,
603 StrongModeCode.INVALID_FIELD_OVERRIDE,
604 StrongModeCode.INVALID_METHOD_OVERRIDE,
605 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE,
606 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN,
607 StrongModeCode.INVALID_PARAMETER_DECLARATION,
608 StrongModeCode.INVALID_SUPER_INVOCATION,
609 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO,
610 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE,
611 TodoCode.TODO,
612 ];
613
614 /**
615 * The lazy initialized map from [ErrorCode.uniqueName] to the [ErrorCode]
616 * instance.
617 */
618 HashMap<String, ErrorCode> _uniqueNameToCodeMap;
619
620 /**
621 * Return the [ErrorCode] with the given [uniqueName], or `null` if not
622 * found.
623 */
624 ErrorCode errorCodeByUniqueName(String uniqueName) {
625 if (_uniqueNameToCodeMap == null) {
626 _uniqueNameToCodeMap = new HashMap<String, ErrorCode>();
627 for (ErrorCode errorCode in errorCodeValues) {
628 _uniqueNameToCodeMap[errorCode.uniqueName] = errorCode;
629 }
630 }
631 return _uniqueNameToCodeMap[uniqueName];
632 }
16 633
17 /** 634 /**
18 * An error discovered during the analysis of some Dart code. 635 * An error discovered during the analysis of some Dart code.
19 * 636 *
20 * See [AnalysisErrorListener]. 637 * See [AnalysisErrorListener].
21 */ 638 */
22 class AnalysisError { 639 class AnalysisError {
23 /** 640 /**
24 * An empty array of errors used when no errors are expected. 641 * An empty array of errors used when no errors are expected.
25 */ 642 */
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 /** 841 /**
225 * Set the value of the given [property] to the given [value]. Using a value 842 * Set the value of the given [property] to the given [value]. Using a value
226 * of `null` will effectively remove the property from this error. 843 * of `null` will effectively remove the property from this error.
227 */ 844 */
228 void setProperty/*<V>*/(ErrorProperty/*<V>*/ property, Object/*=V*/ value) { 845 void setProperty/*<V>*/(ErrorProperty/*<V>*/ property, Object/*=V*/ value) {
229 _propertyMap[property] = value; 846 _propertyMap[property] = value;
230 } 847 }
231 } 848 }
232 849
233 /** 850 /**
234 * An error code associated with an [AnalysisError].
235 *
236 * Generally, we want to provide messages that consist of three sentences. From
237 * the user's perspective these sentences should explain:
238 *
239 * 1. what is wrong,
240 * 2. why is it wrong, and
241 * 3. how do I fix it.
242 *
243 * However, we combine the first two in the [message] and the last in the
244 * [correction].
245 *
246 * When composing messages (including correction messages) keep the following
247 * guidelines in mind.
248 *
249 * 1. The message should be a complete sentence starting with an uppercase
250 * letter, and ending with a period.
251 *
252 * 2. Reserved words and embedded identifiers should be in single quotes, so
253 * prefer double quotes for the complete message. For example,
254 * ```
255 * "The class '{0}' can't use 'super'."
256 * ```
257 * Notice that the word 'class' in the preceding message is not quoted as it
258 * refers to the concept 'class', not the reserved word. On the other hand,
259 * 'super' refers to the reserved word. Do not quote 'null' and numeric literals .
260 *
261 * 3. Do not try to compose messages, as it can make translating them hard.
262 *
263 * 4. Try to keep the error messages short, but informative.
264 *
265 * 5. Use simple words and terminology, assume the reader of the message doesn't
266 * have an advanced degree in math, and that English is not the reader's native
267 * language. Do not assume any formal computer science training. For example, do
268 * not use Latin abbreviations (prefer "that is" over "i.e.", and "for example"
269 * over "e.g."). Also avoid phrases such as "if and only if" and "iff"; that
270 * level of precision is unnecessary.
271 *
272 * 6. Prefer contractions when they are in common use, for example, prefer
273 * "can't" over "cannot". Using "cannot", "must not", "shall not", etc. is
274 * off-putting to people new to programming.
275 *
276 * 7. Use common terminology, preferably from the Dart Language Specification.
277 * This increases the user's chance of finding a good explanation on the web.
278 *
279 * 8. Do not try to be cute or funny. It is extremely frustrating to work on a
280 * product that crashes with a "tongue-in-cheek" message, especially if you did
281 * not want to use this product to begin with.
282 *
283 * 9. Do not lie, that is, do not write error messages containing phrases like
284 * "can't happen". If the user ever saw this message, it would be a lie. Prefer
285 * messages like: "Internal error: This function should not be called when 'x'
286 * is null.".
287 *
288 * 10. Prefer to not use the imperative tone. That is, the message should not
289 * sound accusing or like it is ordering the user around. The computer should
290 * describe the problem, not criticize the user for violating the specification.
291 */
292 abstract class ErrorCode {
293 /**
294 * Engine error code values.
295 */
296 static const List<ErrorCode> values = const [
297 //
298 // Manually generated. You can mostly reproduce this list by running the
299 // following command from the root of the analyzer package:
300 //
301 // > cat
302 // lib/src/analysis_options/error/option_codes.dart';
303 // lib/src/dart/error/hint_codes.dart';
304 // lib/src/dart/error/lint_codes.dart';
305 // lib/src/dart/error/todo_codes.dart';
306 // lib/src/html/error/html_codes.dart';
307 // lib/src/dart/error/syntactic_errors.dart
308 // lib/src/error/codes.dart |
309 // grep 'static const .*Code' |
310 // awk '{print $3"."$4","}' |
311 // sort > codes.txt
312 //
313 // There are a few error codes that are wrapped such that the name of the
314 // error code in on the line following the pattern we're grepping for. Those
315 // need to be filled in by hand.
316 //
317 AnalysisOptionsErrorCode.PARSE_ERROR,
318 AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE,
319 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE,
320 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES,
321 AnalysisOptionsWarningCode.UNSUPPORTED_VALUE,
322 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
323 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
324 CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
325 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
326 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
327 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
328 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
329 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
330 CompileTimeErrorCode.AMBIGUOUS_EXPORT,
331 CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
332 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
333 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT,
334 CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT,
335 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE,
336 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
337 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
338 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
339 CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
340 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
341 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
342 CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD,
343 CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER,
344 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
345 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
346 CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
347 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
348 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN,
349 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
350 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
351 CompileTimeErrorCode.CONST_DEFERRED_CLASS,
352 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
353 CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE,
354 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
355 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING,
356 CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
357 CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
358 CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
359 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
360 CompileTimeErrorCode
361 .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY,
362 CompileTimeErrorCode.CONST_INSTANCE_FIELD,
363 CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
364 CompileTimeErrorCode.CONST_NOT_INITIALIZED,
365 CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS,
366 CompileTimeErrorCode.CONST_WITH_NON_CONST,
367 CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
368 CompileTimeErrorCode.CONST_WITH_NON_TYPE,
369 CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
370 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR,
371 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
372 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
373 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
374 CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR,
375 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
376 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
377 CompileTimeErrorCode.DUPLICATE_DEFINITION,
378 CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE,
379 CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT,
380 CompileTimeErrorCode.DUPLICATE_PART,
381 CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
382 CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
383 CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS,
384 CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
385 CompileTimeErrorCode.EXTENDS_ENUM,
386 CompileTimeErrorCode.EXTENDS_NON_CLASS,
387 CompileTimeErrorCode.EXTRA_ARGUMENT_TO_ASSERT,
388 CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
389 CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
390 CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER,
391 CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR,
392 CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
393 CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR,
394 CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES,
395 CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME,
396 CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
397 CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
398 CompileTimeErrorCode.IMPLEMENTS_DYNAMIC,
399 CompileTimeErrorCode.IMPLEMENTS_ENUM,
400 CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
401 CompileTimeErrorCode.IMPLEMENTS_REPEATED,
402 CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS,
403 CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
404 CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
405 CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY,
406 CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
407 CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD,
408 CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD,
409 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD,
410 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD,
411 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY,
412 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC,
413 CompileTimeErrorCode.INSTANTIATE_ENUM,
414 CompileTimeErrorCode.INVALID_ANNOTATION,
415 CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY,
416 CompileTimeErrorCode.INVALID_CONSTANT,
417 CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME,
418 CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS,
419 CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC,
420 CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR,
421 CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
422 CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS,
423 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST,
424 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP,
425 CompileTimeErrorCode.INVALID_URI,
426 CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
427 CompileTimeErrorCode.LABEL_UNDEFINED,
428 CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
429 CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME,
430 CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
431 CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
432 CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
433 CompileTimeErrorCode.MIXIN_DEFERRED_CLASS,
434 CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS,
435 CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT,
436 CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
437 CompileTimeErrorCode.MIXIN_OF_ENUM,
438 CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
439 CompileTimeErrorCode.MIXIN_REFERENCES_SUPER,
440 CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS,
441 CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS,
442 CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
443 CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR,
444 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION,
445 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY,
446 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
447 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY,
448 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT,
449 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
450 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
451 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
452 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
453 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
454 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
455 CompileTimeErrorCode
456 .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
457 CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
458 CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
459 CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
460 CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS,
461 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
462 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
463 CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
464 CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
465 CompileTimeErrorCode.PART_OF_NON_PART,
466 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER,
467 CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
468 CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER,
469 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
470 CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
471 CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
472 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
473 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS,
474 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS,
475 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH,
476 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR,
477 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR,
478 CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
479 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS,
480 CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR,
481 CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION,
482 CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH,
483 CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR,
484 CompileTimeErrorCode.RETURN_IN_GENERATOR,
485 CompileTimeErrorCode.SHARED_DEFERRED_PREFIX,
486 CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT,
487 CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT,
488 CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
489 CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
490 CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
491 CompileTimeErrorCode.UNDEFINED_CLASS,
492 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER,
493 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT,
494 CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER,
495 CompileTimeErrorCode.URI_DOES_NOT_EXIST,
496 CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED,
497 CompileTimeErrorCode.URI_WITH_INTERPOLATION,
498 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR,
499 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS,
500 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
501 CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR,
502 CompileTimeErrorCode.YIELD_IN_NON_GENERATOR,
503 HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
504 HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
505 HintCode.CAN_BE_NULL_AFTER_NULL_AWARE,
506 HintCode.DEAD_CODE,
507 HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH,
508 HintCode.DEAD_CODE_ON_CATCH_SUBTYPE,
509 HintCode.DEPRECATED_MEMBER_USE,
510 HintCode.DIVISION_OPTIMIZATION,
511 HintCode.DUPLICATE_IMPORT,
512 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
513 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
514 HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
515 HintCode.INVALID_ASSIGNMENT,
516 HintCode.INVALID_FACTORY_ANNOTATION,
517 HintCode.INVALID_FACTORY_METHOD_DECL,
518 HintCode.INVALID_FACTORY_METHOD_IMPL,
519 HintCode.INVALID_USE_OF_PROTECTED_MEMBER,
520 HintCode.IS_DOUBLE,
521 HintCode.IS_INT,
522 HintCode.IS_NOT_DOUBLE,
523 HintCode.IS_NOT_INT,
524 HintCode.MISSING_JS_LIB_ANNOTATION,
525 HintCode.MISSING_REQUIRED_PARAM,
526 HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS,
527 HintCode.MISSING_RETURN,
528 HintCode.MUST_CALL_SUPER,
529 HintCode.NULL_AWARE_IN_CONDITION,
530 HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE,
531 HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD,
532 HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER,
533 HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD,
534 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
535 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
536 HintCode.TYPE_CHECK_IS_NOT_NULL,
537 HintCode.TYPE_CHECK_IS_NULL,
538 HintCode.UNDEFINED_GETTER,
539 HintCode.UNDEFINED_HIDDEN_NAME,
540 HintCode.UNDEFINED_METHOD,
541 HintCode.UNDEFINED_OPERATOR,
542 HintCode.UNDEFINED_SETTER,
543 HintCode.UNDEFINED_SHOWN_NAME,
544 HintCode.UNNECESSARY_CAST,
545 HintCode.UNNECESSARY_NO_SUCH_METHOD,
546 HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
547 HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
548 HintCode.UNUSED_CATCH_CLAUSE,
549 HintCode.UNUSED_CATCH_STACK,
550 HintCode.UNUSED_ELEMENT,
551 HintCode.UNUSED_FIELD,
552 HintCode.UNUSED_IMPORT,
553 HintCode.UNUSED_LOCAL_VARIABLE,
554 HintCode.UNUSED_SHOWN_NAME,
555 HintCode.USE_OF_VOID_RESULT,
556 HtmlErrorCode.PARSE_ERROR,
557 HtmlWarningCode.INVALID_URI,
558 HtmlWarningCode.URI_DOES_NOT_EXIST,
559 ParserErrorCode.ABSTRACT_CLASS_MEMBER,
560 ParserErrorCode.ABSTRACT_ENUM,
561 ParserErrorCode.ABSTRACT_STATIC_METHOD,
562 ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION,
563 ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE,
564 ParserErrorCode.ABSTRACT_TYPEDEF,
565 ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT,
566 ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
567 ParserErrorCode.BREAK_OUTSIDE_OF_LOOP,
568 ParserErrorCode.CLASS_IN_CLASS,
569 ParserErrorCode.COLON_IN_PLACE_OF_IN,
570 ParserErrorCode.CONSTRUCTOR_WITH_RETURN_TYPE,
571 ParserErrorCode.CONST_AND_FINAL,
572 ParserErrorCode.CONST_AND_VAR,
573 ParserErrorCode.CONST_CLASS,
574 ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY,
575 ParserErrorCode.CONST_ENUM,
576 ParserErrorCode.CONST_FACTORY,
577 ParserErrorCode.CONST_METHOD,
578 ParserErrorCode.CONST_TYPEDEF,
579 ParserErrorCode.CONTINUE_OUTSIDE_OF_LOOP,
580 ParserErrorCode.CONTINUE_WITHOUT_LABEL_IN_CASE,
581 ParserErrorCode.DEPRECATED_CLASS_TYPE_ALIAS,
582 ParserErrorCode.DIRECTIVE_AFTER_DECLARATION,
583 ParserErrorCode.DUPLICATED_MODIFIER,
584 ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT,
585 ParserErrorCode.EMPTY_ENUM_BODY,
586 ParserErrorCode.ENUM_IN_CLASS,
587 ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
588 ParserErrorCode.EXPECTED_CASE_OR_DEFAULT,
589 ParserErrorCode.EXPECTED_CLASS_MEMBER,
590 ParserErrorCode.EXPECTED_EXECUTABLE,
591 ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL,
592 ParserErrorCode.EXPECTED_STRING_LITERAL,
593 ParserErrorCode.EXPECTED_TOKEN,
594 ParserErrorCode.EXPECTED_TYPE_NAME,
595 ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
596 ParserErrorCode.EXTERNAL_AFTER_CONST,
597 ParserErrorCode.EXTERNAL_AFTER_FACTORY,
598 ParserErrorCode.EXTERNAL_AFTER_STATIC,
599 ParserErrorCode.EXTERNAL_CLASS,
600 ParserErrorCode.EXTERNAL_CONSTRUCTOR_WITH_BODY,
601 ParserErrorCode.EXTERNAL_ENUM,
602 ParserErrorCode.EXTERNAL_FIELD,
603 ParserErrorCode.EXTERNAL_GETTER_WITH_BODY,
604 ParserErrorCode.EXTERNAL_METHOD_WITH_BODY,
605 ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY,
606 ParserErrorCode.EXTERNAL_SETTER_WITH_BODY,
607 ParserErrorCode.EXTERNAL_TYPEDEF,
608 ParserErrorCode.FACTORY_TOP_LEVEL_DECLARATION,
609 ParserErrorCode.FACTORY_WITHOUT_BODY,
610 ParserErrorCode.FACTORY_WITH_INITIALIZERS,
611 ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
612 ParserErrorCode.FINAL_AND_VAR,
613 ParserErrorCode.FINAL_CLASS,
614 ParserErrorCode.FINAL_CONSTRUCTOR,
615 ParserErrorCode.FINAL_ENUM,
616 ParserErrorCode.FINAL_METHOD,
617 ParserErrorCode.FINAL_TYPEDEF,
618 ParserErrorCode.FUNCTION_TYPED_PARAMETER_VAR,
619 ParserErrorCode.GETTER_IN_FUNCTION,
620 ParserErrorCode.GETTER_WITH_PARAMETERS,
621 ParserErrorCode.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE,
622 ParserErrorCode.IMPLEMENTS_BEFORE_EXTENDS,
623 ParserErrorCode.IMPLEMENTS_BEFORE_WITH,
624 ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
625 ParserErrorCode.INITIALIZED_VARIABLE_IN_FOR_EACH,
626 ParserErrorCode.INVALID_AWAIT_IN_FOR,
627 ParserErrorCode.INVALID_CODE_POINT,
628 ParserErrorCode.INVALID_COMMENT_REFERENCE,
629 ParserErrorCode.INVALID_HEX_ESCAPE,
630 ParserErrorCode.INVALID_LITERAL_IN_CONFIGURATION,
631 ParserErrorCode.INVALID_OPERATOR,
632 ParserErrorCode.INVALID_OPERATOR_FOR_SUPER,
633 ParserErrorCode.INVALID_STAR_AFTER_ASYNC,
634 ParserErrorCode.INVALID_SYNC,
635 ParserErrorCode.INVALID_UNICODE_ESCAPE,
636 ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST,
637 ParserErrorCode.LOCAL_FUNCTION_DECLARATION_MODIFIER,
638 ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
639 ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER,
640 ParserErrorCode.MISSING_CATCH_OR_FINALLY,
641 ParserErrorCode.MISSING_CLASS_BODY,
642 ParserErrorCode.MISSING_CLOSING_PARENTHESIS,
643 ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
644 ParserErrorCode.MISSING_ENUM_BODY,
645 ParserErrorCode.MISSING_EXPRESSION_IN_INITIALIZER,
646 ParserErrorCode.MISSING_EXPRESSION_IN_THROW,
647 ParserErrorCode.MISSING_FUNCTION_BODY,
648 ParserErrorCode.MISSING_FUNCTION_PARAMETERS,
649 ParserErrorCode.MISSING_GET,
650 ParserErrorCode.MISSING_IDENTIFIER,
651 ParserErrorCode.MISSING_INITIALIZER,
652 ParserErrorCode.MISSING_KEYWORD_OPERATOR,
653 ParserErrorCode.MISSING_METHOD_PARAMETERS,
654 ParserErrorCode.MISSING_NAME_IN_LIBRARY_DIRECTIVE,
655 ParserErrorCode.MISSING_NAME_IN_PART_OF_DIRECTIVE,
656 ParserErrorCode.MISSING_PREFIX_IN_DEFERRED_IMPORT,
657 ParserErrorCode.MISSING_STAR_AFTER_SYNC,
658 ParserErrorCode.MISSING_STATEMENT,
659 ParserErrorCode.MISSING_TERMINATOR_FOR_PARAMETER_GROUP,
660 ParserErrorCode.MISSING_TYPEDEF_PARAMETERS,
661 ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH,
662 ParserErrorCode.MIXED_PARAMETER_GROUPS,
663 ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES,
664 ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES,
665 ParserErrorCode.MULTIPLE_LIBRARY_DIRECTIVES,
666 ParserErrorCode.MULTIPLE_NAMED_PARAMETER_GROUPS,
667 ParserErrorCode.MULTIPLE_PART_OF_DIRECTIVES,
668 ParserErrorCode.MULTIPLE_POSITIONAL_PARAMETER_GROUPS,
669 ParserErrorCode.MULTIPLE_VARIABLES_IN_FOR_EACH,
670 ParserErrorCode.MULTIPLE_WITH_CLAUSES,
671 ParserErrorCode.NAMED_FUNCTION_EXPRESSION,
672 ParserErrorCode.NAMED_PARAMETER_OUTSIDE_GROUP,
673 ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE,
674 ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE,
675 ParserErrorCode.NON_CONSTRUCTOR_FACTORY,
676 ParserErrorCode.NON_IDENTIFIER_LIBRARY_NAME,
677 ParserErrorCode.NON_PART_OF_DIRECTIVE_IN_PART,
678 ParserErrorCode.NON_STRING_LITERAL_AS_URI,
679 ParserErrorCode.NON_USER_DEFINABLE_OPERATOR,
680 ParserErrorCode.NORMAL_BEFORE_OPTIONAL_PARAMETERS,
681 ParserErrorCode.NULLABLE_TYPE_IN_EXTENDS,
682 ParserErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS,
683 ParserErrorCode.NULLABLE_TYPE_IN_WITH,
684 ParserErrorCode.NULLABLE_TYPE_PARAMETER,
685 ParserErrorCode.POSITIONAL_AFTER_NAMED_ARGUMENT,
686 ParserErrorCode.POSITIONAL_PARAMETER_OUTSIDE_GROUP,
687 ParserErrorCode.REDIRECTING_CONSTRUCTOR_WITH_BODY,
688 ParserErrorCode.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR,
689 ParserErrorCode.SETTER_IN_FUNCTION,
690 ParserErrorCode.STATIC_AFTER_CONST,
691 ParserErrorCode.STATIC_AFTER_FINAL,
692 ParserErrorCode.STATIC_AFTER_VAR,
693 ParserErrorCode.STATIC_CONSTRUCTOR,
694 ParserErrorCode.STATIC_GETTER_WITHOUT_BODY,
695 ParserErrorCode.STATIC_OPERATOR,
696 ParserErrorCode.STATIC_SETTER_WITHOUT_BODY,
697 ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION,
698 ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
699 ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
700 ParserErrorCode.TOP_LEVEL_OPERATOR,
701 ParserErrorCode.TYPEDEF_IN_CLASS,
702 ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP,
703 ParserErrorCode.UNEXPECTED_TOKEN,
704 ParserErrorCode.VAR_AND_TYPE,
705 ParserErrorCode.VAR_AS_TYPE_NAME,
706 ParserErrorCode.VAR_CLASS,
707 ParserErrorCode.VAR_ENUM,
708 ParserErrorCode.VAR_RETURN_TYPE,
709 ParserErrorCode.VAR_TYPEDEF,
710 ParserErrorCode.VOID_PARAMETER,
711 ParserErrorCode.VOID_VARIABLE,
712 ParserErrorCode.WITH_BEFORE_EXTENDS,
713 ParserErrorCode.WITH_WITHOUT_EXTENDS,
714 ParserErrorCode.WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER,
715 ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP,
716 ScannerErrorCode.ILLEGAL_CHARACTER,
717 ScannerErrorCode.MISSING_DIGIT,
718 ScannerErrorCode.MISSING_HEX_DIGIT,
719 ScannerErrorCode.MISSING_QUOTE,
720 ScannerErrorCode.UNABLE_GET_CONTENT,
721 ScannerErrorCode.UNTERMINATED_MULTI_LINE_COMMENT,
722 ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
723 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
724 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
725 StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
726 StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
727 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
728 StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
729 StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE,
730 StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE,
731 StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
732 StaticTypeWarningCode.INVALID_ASSIGNMENT,
733 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
734 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION,
735 StaticTypeWarningCode.NON_BOOL_CONDITION,
736 StaticTypeWarningCode.NON_BOOL_EXPRESSION,
737 StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION,
738 StaticTypeWarningCode.NON_BOOL_OPERAND,
739 StaticTypeWarningCode.NON_NULLABLE_FIELD_NOT_INITIALIZED,
740 StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT,
741 StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
742 StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
743 StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND,
744 StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT,
745 StaticTypeWarningCode.UNDEFINED_FUNCTION,
746 StaticTypeWarningCode.UNDEFINED_GETTER,
747 StaticTypeWarningCode.UNDEFINED_METHOD,
748 StaticTypeWarningCode.UNDEFINED_METHOD_WITH_CONSTRUCTOR,
749 StaticTypeWarningCode.UNDEFINED_OPERATOR,
750 StaticTypeWarningCode.UNDEFINED_SETTER,
751 StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
752 StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
753 StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
754 StaticTypeWarningCode.UNDEFINED_SUPER_SETTER,
755 StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
756 StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS,
757 StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
758 StaticWarningCode.AMBIGUOUS_IMPORT,
759 StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
760 StaticWarningCode.ASSIGNMENT_TO_CONST,
761 StaticWarningCode.ASSIGNMENT_TO_FINAL,
762 StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER,
763 StaticWarningCode.ASSIGNMENT_TO_FUNCTION,
764 StaticWarningCode.ASSIGNMENT_TO_METHOD,
765 StaticWarningCode.ASSIGNMENT_TO_TYPE,
766 StaticWarningCode.CASE_BLOCK_NOT_TERMINATED,
767 StaticWarningCode.CAST_TO_NON_TYPE,
768 StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
769 StaticWarningCode.CONFLICTING_DART_IMPORT,
770 StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
771 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER,
772 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2,
773 StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER,
774 StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER,
775 StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER,
776 StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
777 StaticWarningCode.EQUAL_KEYS_IN_MAP,
778 StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
779 StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
780 StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION,
781 StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR,
782 StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE,
783 StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
784 StaticWarningCode.FINAL_NOT_INITIALIZED,
785 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
786 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
787 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
788 StaticWarningCode.FUNCTION_WITHOUT_CALL,
789 StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
790 StaticWarningCode.IMPORT_OF_NON_LIBRARY,
791 StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD,
792 StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC,
793 StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE,
794 StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE,
795 StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE,
796 StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE,
797 StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE,
798 StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS,
799 StaticWarningCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND,
800 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
801 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
802 StaticWarningCode.INVALID_OVERRIDE_NAMED,
803 StaticWarningCode.INVALID_OVERRIDE_POSITIONAL,
804 StaticWarningCode.INVALID_OVERRIDE_REQUIRED,
805 StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
806 StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
807 StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
808 StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
809 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
810 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE,
811 StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
812 StaticWarningCode.MIXED_RETURN_TYPES,
813 StaticWarningCode.NEW_WITH_ABSTRACT_CLASS,
814 StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS,
815 StaticWarningCode.NEW_WITH_NON_TYPE,
816 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR,
817 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT,
818 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS,
819 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR,
820 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE,
821 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE,
822 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO,
823 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE,
824 StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR,
825 StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
826 StaticWarningCode.NOT_A_TYPE,
827 StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
828 StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
829 StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE,
830 StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE,
831 StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR,
832 StaticWarningCode.REDIRECT_TO_NON_CLASS,
833 StaticWarningCode.RETURN_WITHOUT_VALUE,
834 StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER,
835 StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE,
836 StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS,
837 StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC,
838 StaticWarningCode.TYPE_TEST_WITH_NON_TYPE,
839 StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME,
840 StaticWarningCode.UNDEFINED_CLASS,
841 StaticWarningCode.UNDEFINED_CLASS_BOOLEAN,
842 StaticWarningCode.UNDEFINED_GETTER,
843 StaticWarningCode.UNDEFINED_IDENTIFIER,
844 StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT,
845 StaticWarningCode.UNDEFINED_NAMED_PARAMETER,
846 StaticWarningCode.UNDEFINED_SETTER,
847 StaticWarningCode.UNDEFINED_STATIC_METHOD_OR_GETTER,
848 StaticWarningCode.UNDEFINED_SUPER_GETTER,
849 StaticWarningCode.UNDEFINED_SUPER_SETTER,
850 StaticWarningCode.VOID_RETURN_FOR_GETTER,
851 StrongModeCode.ASSIGNMENT_CAST,
852 StrongModeCode.COULD_NOT_INFER,
853 StrongModeCode.DOWN_CAST_COMPOSITE,
854 StrongModeCode.DOWN_CAST_IMPLICIT,
855 StrongModeCode.DOWN_CAST_IMPLICIT_ASSIGN,
856 StrongModeCode.DYNAMIC_CAST,
857 StrongModeCode.DYNAMIC_INVOKE,
858 StrongModeCode.IMPLICIT_DYNAMIC_FIELD,
859 StrongModeCode.IMPLICIT_DYNAMIC_FUNCTION,
860 StrongModeCode.IMPLICIT_DYNAMIC_INVOKE,
861 StrongModeCode.IMPLICIT_DYNAMIC_LIST_LITERAL,
862 StrongModeCode.IMPLICIT_DYNAMIC_MAP_LITERAL,
863 StrongModeCode.IMPLICIT_DYNAMIC_METHOD,
864 StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER,
865 StrongModeCode.IMPLICIT_DYNAMIC_RETURN,
866 StrongModeCode.IMPLICIT_DYNAMIC_TYPE,
867 StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE,
868 StrongModeCode.INFERRED_TYPE,
869 StrongModeCode.INFERRED_TYPE_ALLOCATION,
870 StrongModeCode.INFERRED_TYPE_CLOSURE,
871 StrongModeCode.INFERRED_TYPE_LITERAL,
872 StrongModeCode.INVALID_CAST_LITERAL,
873 StrongModeCode.INVALID_CAST_LITERAL_LIST,
874 StrongModeCode.INVALID_CAST_LITERAL_MAP,
875 StrongModeCode.INVALID_CAST_FUNCTION_EXPR,
876 StrongModeCode.INVALID_CAST_NEW_EXPR,
877 StrongModeCode.INVALID_CAST_METHOD,
878 StrongModeCode.INVALID_CAST_FUNCTION,
879 StrongModeCode.INVALID_FIELD_OVERRIDE,
880 StrongModeCode.INVALID_METHOD_OVERRIDE,
881 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_BASE,
882 StrongModeCode.INVALID_METHOD_OVERRIDE_FROM_MIXIN,
883 StrongModeCode.INVALID_PARAMETER_DECLARATION,
884 StrongModeCode.INVALID_SUPER_INVOCATION,
885 StrongModeCode.NON_GROUND_TYPE_CHECK_INFO,
886 StrongModeCode.UNSAFE_BLOCK_CLOSURE_INFERENCE,
887 TodoCode.TODO,
888 ];
889
890 /**
891 * The lazy initialized map from [uniqueName] to the [ErrorCode] instance.
892 */
893 static HashMap<String, ErrorCode> _uniqueNameToCodeMap;
894
895 /**
896 * An empty list of error codes.
897 */
898 static const List<ErrorCode> EMPTY_LIST = const <ErrorCode>[];
899
900 /**
901 * The name of the error code.
902 */
903 final String name;
904
905 /**
906 * The template used to create the message to be displayed for this error. The
907 * message should indicate what is wrong and why it is wrong.
908 */
909 final String message;
910
911 /**
912 * The template used to create the correction to be displayed for this error,
913 * or `null` if there is no correction information for this error. The
914 * correction should indicate how the user can fix the error.
915 */
916 final String correction;
917
918 /**
919 * Initialize a newly created error code to have the given [name]. The message
920 * associated with the error will be created from the given [message]
921 * template. The correction associated with the error will be created from the
922 * given [correction] template.
923 */
924 const ErrorCode(this.name, this.message, [this.correction]);
925
926 /**
927 * The severity of the error.
928 */
929 ErrorSeverity get errorSeverity;
930
931 /**
932 * The type of the error.
933 */
934 ErrorType get type;
935
936 /**
937 * The unique name of this error code.
938 */
939 String get uniqueName => "$runtimeType.$name";
940
941 @override
942 String toString() => uniqueName;
943
944 /**
945 * Return the [ErrorCode] with the given [uniqueName], or `null` if not
946 * found.
947 */
948 static ErrorCode byUniqueName(String uniqueName) {
949 if (_uniqueNameToCodeMap == null) {
950 _uniqueNameToCodeMap = new HashMap<String, ErrorCode>();
951 for (ErrorCode errorCode in values) {
952 _uniqueNameToCodeMap[errorCode.uniqueName] = errorCode;
953 }
954 }
955 return _uniqueNameToCodeMap[uniqueName];
956 }
957 }
958
959 /**
960 * The properties that can be associated with an [AnalysisError]. 851 * The properties that can be associated with an [AnalysisError].
961 */ 852 */
962 class ErrorProperty<V> implements Comparable<ErrorProperty> { 853 class ErrorProperty<V> implements Comparable<ErrorProperty> {
963 /** 854 /**
964 * A property whose value is a list of [FieldElement]s that are final, but 855 * A property whose value is a list of [FieldElement]s that are final, but
965 * not initialized by a constructor. 856 * not initialized by a constructor.
966 */ 857 */
967 static const ErrorProperty<List<FieldElement>> NOT_INITIALIZED_FIELDS = 858 static const ErrorProperty<List<FieldElement>> NOT_INITIALIZED_FIELDS =
968 const ErrorProperty<List<FieldElement>>('NOT_INITIALIZED_FIELDS', 0); 859 const ErrorProperty<List<FieldElement>>('NOT_INITIALIZED_FIELDS', 0);
969 860
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 893
1003 @override 894 @override
1004 int get hashCode => ordinal; 895 int get hashCode => ordinal;
1005 896
1006 @override 897 @override
1007 int compareTo(ErrorProperty other) => ordinal - other.ordinal; 898 int compareTo(ErrorProperty other) => ordinal - other.ordinal;
1008 899
1009 @override 900 @override
1010 String toString() => name; 901 String toString() => name;
1011 } 902 }
1012
1013 /**
1014 * The severity of an [ErrorCode].
1015 */
1016 class ErrorSeverity implements Comparable<ErrorSeverity> {
1017 /**
1018 * The severity representing a non-error. This is never used for any error
1019 * code, but is useful for clients.
1020 */
1021 static const ErrorSeverity NONE = const ErrorSeverity('NONE', 0, " ", "none");
1022
1023 /**
1024 * The severity representing an informational level analysis issue.
1025 */
1026 static const ErrorSeverity INFO = const ErrorSeverity('INFO', 1, "I", "info");
1027
1028 /**
1029 * The severity representing a warning. Warnings can become errors if the `-We rror` command
1030 * line flag is specified.
1031 */
1032 static const ErrorSeverity WARNING =
1033 const ErrorSeverity('WARNING', 2, "W", "warning");
1034
1035 /**
1036 * The severity representing an error.
1037 */
1038 static const ErrorSeverity ERROR =
1039 const ErrorSeverity('ERROR', 3, "E", "error");
1040
1041 static const List<ErrorSeverity> values = const [NONE, INFO, WARNING, ERROR];
1042
1043 /**
1044 * The name of this error code.
1045 */
1046 final String name;
1047
1048 /**
1049 * The ordinal value of the error code.
1050 */
1051 final int ordinal;
1052
1053 /**
1054 * The name of the severity used when producing machine output.
1055 */
1056 final String machineCode;
1057
1058 /**
1059 * The name of the severity used when producing readable output.
1060 */
1061 final String displayName;
1062
1063 /**
1064 * Initialize a newly created severity with the given names.
1065 */
1066 const ErrorSeverity(
1067 this.name, this.ordinal, this.machineCode, this.displayName);
1068
1069 @override
1070 int get hashCode => ordinal;
1071
1072 @override
1073 int compareTo(ErrorSeverity other) => ordinal - other.ordinal;
1074
1075 /**
1076 * Return the severity constant that represents the greatest severity.
1077 */
1078 ErrorSeverity max(ErrorSeverity severity) =>
1079 this.ordinal >= severity.ordinal ? this : severity;
1080
1081 @override
1082 String toString() => name;
1083 }
1084
1085 /**
1086 * The type of an [ErrorCode].
1087 */
1088 class ErrorType implements Comparable<ErrorType> {
1089 /**
1090 * Task (todo) comments in user code.
1091 */
1092 static const ErrorType TODO = const ErrorType('TODO', 0, ErrorSeverity.INFO);
1093
1094 /**
1095 * Extra analysis run over the code to follow best practices, which are not in
1096 * the Dart Language Specification.
1097 */
1098 static const ErrorType HINT = const ErrorType('HINT', 1, ErrorSeverity.INFO);
1099
1100 /**
1101 * Compile-time errors are errors that preclude execution. A compile time
1102 * error must be reported by a Dart compiler before the erroneous code is
1103 * executed.
1104 */
1105 static const ErrorType COMPILE_TIME_ERROR =
1106 const ErrorType('COMPILE_TIME_ERROR', 2, ErrorSeverity.ERROR);
1107
1108 /**
1109 * Checked mode compile-time errors are errors that preclude execution in
1110 * checked mode.
1111 */
1112 static const ErrorType CHECKED_MODE_COMPILE_TIME_ERROR = const ErrorType(
1113 'CHECKED_MODE_COMPILE_TIME_ERROR', 3, ErrorSeverity.ERROR);
1114
1115 /**
1116 * Static warnings are those warnings reported by the static checker. They
1117 * have no effect on execution. Static warnings must be provided by Dart
1118 * compilers used during development.
1119 */
1120 static const ErrorType STATIC_WARNING =
1121 const ErrorType('STATIC_WARNING', 4, ErrorSeverity.WARNING);
1122
1123 /**
1124 * Many, but not all, static warnings relate to types, in which case they are
1125 * known as static type warnings.
1126 */
1127 static const ErrorType STATIC_TYPE_WARNING =
1128 const ErrorType('STATIC_TYPE_WARNING', 5, ErrorSeverity.WARNING);
1129
1130 /**
1131 * Syntactic errors are errors produced as a result of input that does not
1132 * conform to the grammar.
1133 */
1134 static const ErrorType SYNTACTIC_ERROR =
1135 const ErrorType('SYNTACTIC_ERROR', 6, ErrorSeverity.ERROR);
1136
1137 /**
1138 * Lint warnings describe style and best practice recommendations that can be
1139 * used to formalize a project's style guidelines.
1140 */
1141 static const ErrorType LINT = const ErrorType('LINT', 7, ErrorSeverity.INFO);
1142
1143 static const List<ErrorType> values = const [
1144 TODO,
1145 HINT,
1146 COMPILE_TIME_ERROR,
1147 CHECKED_MODE_COMPILE_TIME_ERROR,
1148 STATIC_WARNING,
1149 STATIC_TYPE_WARNING,
1150 SYNTACTIC_ERROR,
1151 LINT
1152 ];
1153
1154 /**
1155 * The name of this error type.
1156 */
1157 final String name;
1158
1159 /**
1160 * The ordinal value of the error type.
1161 */
1162 final int ordinal;
1163
1164 /**
1165 * The severity of this type of error.
1166 */
1167 final ErrorSeverity severity;
1168
1169 /**
1170 * Initialize a newly created error type to have the given [name] and
1171 * [severity].
1172 */
1173 const ErrorType(this.name, this.ordinal, this.severity);
1174
1175 String get displayName => name.toLowerCase().replaceAll('_', ' ');
1176
1177 @override
1178 int get hashCode => ordinal;
1179
1180 @override
1181 int compareTo(ErrorType other) => ordinal - other.ordinal;
1182
1183 @override
1184 String toString() => name;
1185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698