Version 2.15.0-173.0.dev

Merge commit '4f80522fe4ddd9a043aec5b70715021bc47f0cfd' into 'dev'
diff --git a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
index 7deaa33..b7c18d1 100644
--- a/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
+++ b/benchmarks/SDKArtifactSizes/dart/SDKArtifactSizes.dart
@@ -24,7 +24,6 @@
   'dartdev',
   'dartdevc',
   'dartdoc',
-  'dartfmt',
   'dds',
   'frontend_server',
   'gen_kernel',
diff --git a/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart b/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
index 71e5a48..f207e3a 100644
--- a/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
+++ b/benchmarks/SDKArtifactSizes/dart2/SDKArtifactSizes.dart
@@ -26,7 +26,6 @@
   'dartdev',
   'dartdevc',
   'dartdoc',
-  'dartfmt',
   'dds',
   'frontend_server',
   'gen_kernel',
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index 8ce5731..8d97c49 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -1,5 +1,5 @@
 name: _fe_analyzer_shared
-version: 26.0.0
+version: 27.0.0
 description: Logic that is shared between the front_end and analyzer packages.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/_fe_analyzer_shared
 
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index dd484df..7007543 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 2.4.0-dev
+## 2.4.0
 * Deprecated `ResourceProvider.getModificationTimes()`.
 * Deprecated `MemoryResourceProvider.newDummyLink()`.
 * Deprecated `MemoryResourceProvider.updateFile()`.
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index 33ea055..56ca27b 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -2,214 +2,4 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-
-/// The error codes used for errors in analysis options files. The convention
-/// for this class is for the name of the error code to indicate the problem
-/// that caused the error to be generated and for the error message to explain
-/// what is wrong and, when appropriate, how the problem can be corrected.
-class AnalysisOptionsErrorCode extends ErrorCode {
-  /// An error code indicating that there is a syntactic error in the included
-  /// file.
-  ///
-  /// Parameters:
-  /// 0: the path of the file containing the error
-  /// 1: the starting offset of the text in the file that contains the error
-  /// 2: the ending offset of the text in the file that contains the error
-  /// 3: the error message
-  static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
-      AnalysisOptionsErrorCode(
-          'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
-
-  /// An error code indicating that there is a syntactic error in the file.
-  ///
-  /// Parameters:
-  /// 0: the error message from the parse error
-  static const AnalysisOptionsErrorCode PARSE_ERROR =
-      AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
-
-  /// Initialize a newly created error code to have the given [name].
-  const AnalysisOptionsErrorCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsErrorCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-class AnalysisOptionsHintCode extends ErrorCode {
-  /// An error code indicating that the enablePreviewDart2 setting is
-  /// deprecated.
-  static const AnalysisOptionsHintCode PREVIEW_DART_2_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('PREVIEW_DART_2_SETTING_DEPRECATED',
-          "The 'enablePreviewDart2' setting is deprecated.",
-          correction: "It is no longer necessary to explicitly enable Dart 2.");
-
-  /// An error code indicating that strong-mode: true is deprecated.
-  static const AnalysisOptionsHintCode STRONG_MODE_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('STRONG_MODE_SETTING_DEPRECATED',
-          "The 'strong-mode: true' setting is deprecated.",
-          correction:
-              "It is no longer necessary to explicitly enable strong mode.");
-
-  /// An error code indicating that the enablePreviewDart2 setting is
-  /// deprecated.
-  static const AnalysisOptionsHintCode SUPER_MIXINS_SETTING_DEPRECATED =
-      AnalysisOptionsHintCode('SUPER_MIXINS_SETTING_DEPRECATED',
-          "The 'enableSuperMixins' setting is deprecated.",
-          correction:
-              "Support has been added to the language for 'mixin' based "
-              'mixins.');
-
-  /// Initialize a newly created hint code to have the given [name].
-  const AnalysisOptionsHintCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsHintCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
-
-  @override
-  ErrorType get type => ErrorType.HINT;
-}
-
-/// The error codes used for warnings in analysis options files. The convention
-/// for this class is for the name of the error code to indicate the problem
-/// that caused the error to be generated and for the error message to explain
-/// what is wrong and, when appropriate, how the problem can be corrected.
-class AnalysisOptionsWarningCode extends ErrorCode {
-  /// An error code indicating that the given option is deprecated.
-  static const AnalysisOptionsWarningCode ANALYSIS_OPTION_DEPRECATED =
-      AnalysisOptionsWarningCode('ANALYSIS_OPTION_DEPRECATED',
-          "The option '{0}' is no longer supported.");
-
-  /// An error code indicating a specified include file could not be found.
-  ///
-  /// Parameters:
-  /// 0: the uri of the file to be included
-  /// 1: the path of the file containing the include directive
-  /// 2: the path of the context being analyzed
-  static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
-      AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND',
-          "The include file '{0}' in '{1}' can't be found when analyzing '{2}'.");
-
-  /// An error code indicating a specified include file has a warning.
-  ///
-  /// Parameters:
-  /// 0: the path of the file containing the warnings
-  /// 1: the starting offset of the text in the file that contains the warning
-  /// 2: the ending offset of the text in the file that contains the warning
-  /// 3: the warning message
-  static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
-      AnalysisOptionsWarningCode('INCLUDED_FILE_WARNING',
-          "Warning in the included options file {0}({1}..{2}): {3}");
-
-  /// An error code indicating that a plugin is being configured with an invalid
-  /// value for an option and a detail message is provided.
-  static const AnalysisOptionsWarningCode INVALID_OPTION =
-      AnalysisOptionsWarningCode(
-          'INVALID_OPTION', "Invalid option specified for '{0}': {1}");
-
-  /// An error code indicating an invalid format for an options file section.
-  ///
-  /// Parameters:
-  /// 0: the section name
-  static const AnalysisOptionsWarningCode INVALID_SECTION_FORMAT =
-      AnalysisOptionsWarningCode(
-          'INVALID_SECTION_FORMAT', "Invalid format for the '{0}' section.");
-
-  /// An error code indicating that strong-mode: false is has been removed.
-  static const AnalysisOptionsWarningCode SPEC_MODE_REMOVED =
-      AnalysisOptionsWarningCode('SPEC_MODE_REMOVED',
-          "The option 'strong-mode: false' is no longer supported.",
-          correction:
-              "It's recommended to remove the 'strong-mode:' setting (and make "
-              "your code Dart 2 compliant).");
-
-  /// An error code indicating that an unrecognized error code is being used to
-  /// specify an error filter.
-  ///
-  /// Parameters:
-  /// 0: the unrecognized error code
-  static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
-      AnalysisOptionsWarningCode(
-          'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option where there is just one legal value.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  /// 2: the legal value
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
-      AnalysisOptionsWarningCode(
-          'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
-          "The option '{1}' isn't supported by '{0}'. "
-              "Try using the only supported option: '{2}'.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option and legal options are provided.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  /// 2: legal values
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
-      AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
-          "The option '{1}' isn't supported by '{0}'.",
-          correction: "Try using one of the supported options: {2}.");
-
-  /// An error code indicating that a plugin is being configured with an
-  /// unsupported option and legal options are provided.
-  ///
-  /// Parameters:
-  /// 0: the plugin name
-  /// 1: the unsupported option key
-  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITHOUT_VALUES =
-      AnalysisOptionsWarningCode(
-    'UNSUPPORTED_OPTION_WITHOUT_VALUES',
-    "The option '{1}' isn't supported by '{0}'.",
-  );
-
-  /// An error code indicating that an option entry is being configured with an
-  /// unsupported value.
-  ///
-  /// Parameters:
-  /// 0: the option name
-  /// 1: the unsupported value
-  /// 2: legal values
-  static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
-      AnalysisOptionsWarningCode(
-          'UNSUPPORTED_VALUE', "The value '{1}' isn't supported by '{0}'.",
-          correction: "Try using one of the supported options: {2}.");
-
-  /// Initialize a newly created warning code to have the given [name].
-  const AnalysisOptionsWarningCode(String name, String message,
-      {String? correction})
-      : super(
-          correction: correction,
-          message: message,
-          name: name,
-          uniqueName: 'AnalysisOptionsWarningCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
+export 'package:analyzer/src/analysis_options/error/option_codes.g.dart';
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
new file mode 100644
index 0000000..4c95c70
--- /dev/null
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.g.dart
@@ -0,0 +1,294 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class AnalysisOptionsErrorCode extends ErrorCode {
+  /**
+   * An error code indicating that there is a syntactic error in the included
+   * file.
+   *
+   * Parameters:
+   * 0: the path of the file containing the error
+   * 1: the starting offset of the text in the file that contains the error
+   * 2: the ending offset of the text in the file that contains the error
+   * 3: the error message
+   */
+  static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
+      AnalysisOptionsErrorCode(
+    'INCLUDED_FILE_PARSE_ERROR',
+    "{3} in {0}({1}..{2})",
+  );
+
+  /**
+   * An error code indicating that there is a syntactic error in the file.
+   *
+   * Parameters:
+   * 0: the error message from the parse error
+   */
+  static const AnalysisOptionsErrorCode PARSE_ERROR = AnalysisOptionsErrorCode(
+    'PARSE_ERROR',
+    "{0}",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsErrorCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsErrorCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
+
+class AnalysisOptionsHintCode extends ErrorCode {
+  /**
+   * An error code indicating that the enablePreviewDart2 setting is
+   * deprecated.
+   */
+  static const AnalysisOptionsHintCode PREVIEW_DART_2_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'PREVIEW_DART_2_SETTING_DEPRECATED',
+    "The 'enablePreviewDart2' setting is deprecated.",
+    correction: "It is no longer necessary to explicitly enable Dart 2.",
+  );
+
+  /**
+   * An error code indicating that strong-mode: true is deprecated.
+   */
+  static const AnalysisOptionsHintCode STRONG_MODE_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'STRONG_MODE_SETTING_DEPRECATED',
+    "The 'strong-mode: true' setting is deprecated.",
+    correction: "It is no longer necessary to explicitly enable strong mode.",
+  );
+
+  /**
+   * An error code indicating that the enablePreviewDart2 setting is
+   * deprecated.
+   */
+  static const AnalysisOptionsHintCode SUPER_MIXINS_SETTING_DEPRECATED =
+      AnalysisOptionsHintCode(
+    'SUPER_MIXINS_SETTING_DEPRECATED',
+    "The 'enableSuperMixins' setting is deprecated.",
+    correction:
+        "Support has been added to the language for 'mixin' based mixins.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsHintCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsHintCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
+
+  @override
+  ErrorType get type => ErrorType.HINT;
+}
+
+class AnalysisOptionsWarningCode extends ErrorCode {
+  /**
+   * An error code indicating that the given option is deprecated.
+   */
+  static const AnalysisOptionsWarningCode ANALYSIS_OPTION_DEPRECATED =
+      AnalysisOptionsWarningCode(
+    'ANALYSIS_OPTION_DEPRECATED',
+    "The option '{0}' is no longer supported.",
+  );
+
+  /**
+   * An error code indicating a specified include file has a warning.
+   *
+   * Parameters:
+   * 0: the path of the file containing the warnings
+   * 1: the starting offset of the text in the file that contains the warning
+   * 2: the ending offset of the text in the file that contains the warning
+   * 3: the warning message
+   */
+  static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
+      AnalysisOptionsWarningCode(
+    'INCLUDED_FILE_WARNING',
+    "Warning in the included options file {0}({1}..{2}): {3}",
+  );
+
+  /**
+   * An error code indicating a specified include file could not be found.
+   *
+   * Parameters:
+   * 0: the uri of the file to be included
+   * 1: the path of the file containing the include directive
+   * 2: the path of the context being analyzed
+   */
+  static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
+      AnalysisOptionsWarningCode(
+    'INCLUDE_FILE_NOT_FOUND',
+    "The include file '{0}' in '{1}' can't be found when analyzing '{2}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an invalid
+   * value for an option and a detail message is provided.
+   */
+  static const AnalysisOptionsWarningCode INVALID_OPTION =
+      AnalysisOptionsWarningCode(
+    'INVALID_OPTION',
+    "Invalid option specified for '{0}': {1}",
+  );
+
+  /**
+   * An error code indicating an invalid format for an options file section.
+   *
+   * Parameters:
+   * 0: the section name
+   */
+  static const AnalysisOptionsWarningCode INVALID_SECTION_FORMAT =
+      AnalysisOptionsWarningCode(
+    'INVALID_SECTION_FORMAT',
+    "Invalid format for the '{0}' section.",
+  );
+
+  /**
+   * An error code indicating that strong-mode: false is has been removed.
+   */
+  static const AnalysisOptionsWarningCode SPEC_MODE_REMOVED =
+      AnalysisOptionsWarningCode(
+    'SPEC_MODE_REMOVED',
+    "The option 'strong-mode: false' is no longer supported.",
+    correction:
+        "It's recommended to remove the 'strong-mode:' setting (and make your code Dart 2 compliant).",
+  );
+
+  /**
+   * An error code indicating that an unrecognized error code is being used to
+   * specify an error filter.
+   *
+   * Parameters:
+   * 0: the unrecognized error code
+   */
+  static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
+      AnalysisOptionsWarningCode(
+    'UNRECOGNIZED_ERROR_CODE',
+    "'{0}' isn't a recognized error code.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option and legal options are provided.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITHOUT_VALUES =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITHOUT_VALUES',
+    "The option '{1}' isn't supported by '{0}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option where there is just one legal value.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   * 2: the legal value
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
+    "The option '{1}' isn't supported by '{0}'. Try using the only supported option: '{2}'.",
+  );
+
+  /**
+   * An error code indicating that a plugin is being configured with an
+   * unsupported option and legal options are provided.
+   *
+   * Parameters:
+   * 0: the plugin name
+   * 1: the unsupported option key
+   * 2: legal values
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
+    "The option '{1}' isn't supported by '{0}'.",
+    correction: "Try using one of the supported options: {2}.",
+  );
+
+  /**
+   * An error code indicating that an option entry is being configured with an
+   * unsupported value.
+   *
+   * Parameters:
+   * 0: the option name
+   * 1: the unsupported value
+   * 2: legal values
+   */
+  static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
+      AnalysisOptionsWarningCode(
+    'UNSUPPORTED_VALUE',
+    "The value '{1}' isn't supported by '{0}'.",
+    correction: "Try using one of the supported options: {2}.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const AnalysisOptionsWarningCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'AnalysisOptionsWarningCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
index 8896d3e..07984a3 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
@@ -2,414 +2,4 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/analyzer_error_code.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/// The diagnostic codes associated with `dart:ffi`.
-class FfiCode extends AnalyzerErrorCode {
-  /**
-   * No parameters.
-   */
-  static const FfiCode ANNOTATION_ON_POINTER_FIELD = FfiCode(
-      name: 'ANNOTATION_ON_POINTER_FIELD',
-      message:
-          "Fields in a struct class whose type is 'Pointer' should not have "
-          "any annotations.",
-      correction: "Try removing the annotation.");
-
-  /**
-   * Parameters:
-   * 0: the name of the argument
-   */
-  static const FfiCode ARGUMENT_MUST_BE_A_CONSTANT = FfiCode(
-      name: 'ARGUMENT_MUST_BE_A_CONSTANT',
-      message: "Argument '{0}' must be a constant.",
-      correction: "Try replacing the value with a literal or const.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode CREATION_OF_STRUCT_OR_UNION = FfiCode(
-    name: 'CREATION_OF_STRUCT_OR_UNION',
-    message: "Subclasses of 'Struct' and 'Union' are backed by native memory, "
-        "and can't be instantiated by a generative constructor.",
-    correction: "Try allocating it via allocation, or load from a 'Pointer'.",
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the struct class
-   */
-  static const FfiCode EMPTY_STRUCT = FfiCode(
-      name: 'EMPTY_STRUCT',
-      message: "Struct '{0}' is empty. Empty structs are undefined behavior.",
-      correction: "Try adding a field to '{0}' or use a different Struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode EXTRA_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'EXTRA_ANNOTATION_ON_STRUCT_FIELD',
-      message: "Fields in a struct class must have exactly one annotation "
-          "indicating the native type.",
-      correction: "Try removing the extra annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode EXTRA_SIZE_ANNOTATION_CARRAY = FfiCode(
-      name: 'EXTRA_SIZE_ANNOTATION_CARRAY',
-      message: "'Array's must have exactly one 'Array' annotation.",
-      correction: "Try removing the extra annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FFI_NATIVE_ONLY_STATIC = FfiCode(
-      name: 'FFI_NATIVE_ONLY_STATIC',
-      message: "FfiNative annotations can only be used on static functions.",
-      correction: "Change the method to static.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
-      name: 'FIELD_IN_STRUCT_WITH_INITIALIZER',
-      message:
-          "Fields in subclasses of 'Struct' and 'Union' can't have initializers.",
-      correction:
-          "Try removing the initializer and marking the field as external.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_INITIALIZER_IN_STRUCT = FfiCode(
-      name: 'FIELD_INITIALIZER_IN_STRUCT',
-      message:
-          "Constructors in subclasses of 'Struct' and 'Union' can't have field "
-          "initializers.",
-      correction: "Try removing the field initializer and marking the field as"
-          " external.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode FIELD_MUST_BE_EXTERNAL_IN_STRUCT = FfiCode(
-      name: 'FIELD_MUST_BE_EXTERNAL_IN_STRUCT',
-      message:
-          "Fields of 'Struct' and 'Union' subclasses must be marked external.",
-      correction: "Try adding the 'external' modifier.");
-
-  /**
-   * Parameters:
-   * 0: the name of the struct class
-   */
-  static const FfiCode GENERIC_STRUCT_SUBCLASS = FfiCode(
-      name: 'GENERIC_STRUCT_SUBCLASS',
-      message:
-          "The class '{0}' can't extend 'Struct' or 'Union' because it is generic.",
-      correction: "Try removing the type parameters from '{0}'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode INVALID_EXCEPTION_VALUE = FfiCode(
-      name: 'INVALID_EXCEPTION_VALUE',
-      message:
-          "The method 'Pointer.fromFunction' must not have an exceptional return "
-          "value (the second argument) when the return type of the function is "
-          "either 'void', 'Handle' or 'Pointer'.",
-      correction: "Try removing the exceptional return value.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode INVALID_FIELD_TYPE_IN_STRUCT = FfiCode(
-      name: 'INVALID_FIELD_TYPE_IN_STRUCT',
-      message:
-          "Fields in struct classes can't have the type '{0}'. They can only "
-          "be declared as 'int', 'double', 'Array', 'Pointer', or subtype of "
-          "'Struct' or 'Union'.",
-      correction:
-          "Try using 'int', 'double', 'Array', 'Pointer', or subtype of "
-          "'Struct' or 'Union'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode LEAF_CALL_MUST_NOT_RETURN_HANDLE = FfiCode(
-      name: 'LEAF_CALL_MUST_NOT_RETURN_HANDLE',
-      message: "FFI leaf call must not return a Handle.",
-      correction: "Try changing the return type to primitive or struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode LEAF_CALL_MUST_NOT_TAKE_HANDLE = FfiCode(
-      name: 'LEAF_CALL_MUST_NOT_TAKE_HANDLE',
-      message: "FFI leaf call must not take arguments of type Handle.",
-      correction: "Try changing the argument type to primitive or struct.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISMATCHED_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'MISMATCHED_ANNOTATION_ON_STRUCT_FIELD',
-      message: "The annotation does not match the declared type of the field.",
-      correction: "Try using a different annotation or changing the declared "
-          "type to match.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
-      name: 'MISSING_ANNOTATION_ON_STRUCT_FIELD',
-      message:
-          "Fields in a struct class must either have the type 'Pointer' or an "
-          "annotation indicating the native type.",
-      correction: "Try adding an annotation.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_EXCEPTION_VALUE = FfiCode(
-      name: 'MISSING_EXCEPTION_VALUE',
-      message:
-          "The method 'Pointer.fromFunction' must have an exceptional return "
-          "value (the second argument) when the return type of the function is "
-          "neither 'void', 'Handle' or 'Pointer'.",
-      correction: "Try adding an exceptional return value.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode MISSING_FIELD_TYPE_IN_STRUCT = FfiCode(
-      name: 'MISSING_FIELD_TYPE_IN_STRUCT',
-      message:
-          "Fields in struct classes must have an explicitly declared type of "
-          "'int', 'double' or 'Pointer'.",
-      correction: "Try using 'int', 'double' or 'Pointer'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode MISSING_SIZE_ANNOTATION_CARRAY = FfiCode(
-      name: 'MISSING_SIZE_ANNOTATION_CARRAY',
-      message: "'Array's must have exactly one 'Array' annotation.",
-      correction: "Try adding a 'Array' annotation.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a valid dart:ffi native type.
-   * 1: the name of the function whose invocation depends on this relationship
-   */
-  static const FfiCode MUST_BE_A_NATIVE_FUNCTION_TYPE = FfiCode(
-      name: 'MUST_BE_A_NATIVE_FUNCTION_TYPE',
-      message:
-          "The type '{0}' given to '{1}' must be a valid 'dart:ffi' native "
-          "function type.",
-      correction: "Try changing the type to only use members for 'dart:ffi'.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a subtype
-   * 1: the supertype that the subtype is compared to
-   * 2: the name of the function whose invocation depends on this relationship
-   */
-  static const FfiCode MUST_BE_A_SUBTYPE = FfiCode(
-      name: 'MUST_BE_A_SUBTYPE',
-      message: "The type '{0}' must be a subtype of '{1}' for '{2}'.",
-      correction: "Try changing one or both of the type arguments.");
-
-  /**
-   * Parameters:
-   * 0: the name of the function, method, or constructor having type arguments
-   */
-  static const FfiCode NON_CONSTANT_TYPE_ARGUMENT = FfiCode(
-      name: 'NON_CONSTANT_TYPE_ARGUMENT',
-      message:
-          "The type arguments to '{0}' must be compile time constants but type "
-          "parameters are not constants.",
-      correction: "Try changing the type argument to be a constant type.");
-
-  /**
-   * Parameters:
-   * 0: the type that should be a valid dart:ffi native type.
-   */
-  static const FfiCode NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER = FfiCode(
-      name: 'NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER',
-      message: "The type argument for the pointer '{0}' must be a "
-          "'NativeFunction' in order to use 'asFunction'.",
-      correction: "Try changing the type argument to be a 'NativeFunction'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode NON_POSITIVE_ARRAY_DIMENSION = FfiCode(
-      name: 'NON_POSITIVE_ARRAY_DIMENSION',
-      message: "Array dimensions must be positive numbers.",
-      correction: "Try changing the input to a positive number.");
-
-  /**
-   * Parameters:
-   * 0: the type of the field
-   */
-  static const FfiCode NON_SIZED_TYPE_ARGUMENT = FfiCode(
-      name: 'NON_SIZED_TYPE_ARGUMENT',
-      message:
-          "Type arguments to '{0}' can't have the type '{1}'. They can only "
-          "be declared as native integer, 'Float', 'Double', 'Pointer', or "
-          "subtype of 'Struct' or 'Union'.",
-      correction: "Try using a native integer, 'Float', 'Double', 'Pointer', "
-          "or subtype of 'Struct' or 'Union'.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode PACKED_ANNOTATION = FfiCode(
-      name: 'PACKED_ANNOTATION',
-      message: "Structs must have at most one 'Packed' annotation.",
-      correction: "Try removing extra 'Packed' annotations.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode PACKED_ANNOTATION_ALIGNMENT = FfiCode(
-      name: 'PACKED_ANNOTATION_ALIGNMENT',
-      message: "Only packing to 1, 2, 4, 8, and 16 bytes is supported.",
-      correction:
-          "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16.");
-
-  /**
-   * Parameters:
-   * 0: the name of the outer struct
-   * 1: the name of the struct being nested
-   */
-  static const FfiCode PACKED_NESTING_NON_PACKED = FfiCode(
-      name: 'PACKED_NESTING_NON_PACKED',
-      message:
-          "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' is not supported.",
-      correction:
-          "Try packing the nested struct or packing the nested struct more tightly.");
-
-  /**
-   * No parameters.
-   */
-  static const FfiCode SIZE_ANNOTATION_DIMENSIONS = FfiCode(
-      name: 'SIZE_ANNOTATION_DIMENSIONS',
-      message:
-          "'Array's must have an 'Array' annotation that matches the dimensions.",
-      correction: "Try adjusting the arguments in the 'Array' annotation.");
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_EXTENDS = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't extend '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_EXTENDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't implement '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_WITH = FfiCode(
-    name: 'SUBTYPE_OF_FFI_CLASS',
-    message: "The class '{0}' can't mix in '{1}'.",
-    correction: "Try extending 'Struct' or 'Union'.",
-    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_WITH',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message: "The class '{0}' can't extend '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message:
-        "The class '{0}' can't implement '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the subclass
-   * 1: the name of the class being extended, implemented, or mixed in
-   */
-  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_WITH = FfiCode(
-    name: 'SUBTYPE_OF_STRUCT_CLASS',
-    message: "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of "
-        "'Struct' or 'Union'.",
-    correction: "Try extending 'Struct' or 'Union' directly.",
-    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_WITH',
-  );
-
-  /// Initialize a newly created error code to have the given [name]. If
-  /// [uniqueName] is provided, then it will be used to construct the unique
-  /// name for the code, otherwise the name will be used to construct the unique
-  /// name.
-  ///
-  /// The message associated with the error will be created from the given
-  /// [message] template. The correction associated with the error will be
-  /// created from the given [correction] template.
-  ///
-  /// If [hasPublishedDocs] is `true` then a URL for the docs will be generated.
-  const FfiCode({
-    String? correction,
-    bool hasPublishedDocs = false,
-    required String message,
-    required String name,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: 'FfiCode.${uniqueName ?? name}',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => type.severity;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
+export 'package:analyzer/src/dart/error/ffi_code.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
new file mode 100644
index 0000000..8edc5cf
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
@@ -0,0 +1,404 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+import "package:analyzer/src/error/analyzer_error_code.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class FfiCode extends AnalyzerErrorCode {
+  /**
+   * No parameters.
+   */
+  static const FfiCode ANNOTATION_ON_POINTER_FIELD = FfiCode(
+    'ANNOTATION_ON_POINTER_FIELD',
+    "Fields in a struct class whose type is 'Pointer' should not have any annotations.",
+    correction: "Try removing the annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the argument
+   */
+  static const FfiCode ARGUMENT_MUST_BE_A_CONSTANT = FfiCode(
+    'ARGUMENT_MUST_BE_A_CONSTANT',
+    "Argument '{0}' must be a constant.",
+    correction: "Try replacing the value with a literal or const.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode CREATION_OF_STRUCT_OR_UNION = FfiCode(
+    'CREATION_OF_STRUCT_OR_UNION',
+    "Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor.",
+    correction: "Try allocating it via allocation, or load from a 'Pointer'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the struct class
+   */
+  static const FfiCode EMPTY_STRUCT = FfiCode(
+    'EMPTY_STRUCT',
+    "Struct '{0}' is empty. Empty structs are undefined behavior.",
+    correction: "Try adding a field to '{0}' or use a different Struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode EXTRA_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'EXTRA_ANNOTATION_ON_STRUCT_FIELD',
+    "Fields in a struct class must have exactly one annotation indicating the native type.",
+    correction: "Try removing the extra annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode EXTRA_SIZE_ANNOTATION_CARRAY = FfiCode(
+    'EXTRA_SIZE_ANNOTATION_CARRAY',
+    "'Array's must have exactly one 'Array' annotation.",
+    correction: "Try removing the extra annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FFI_NATIVE_ONLY_STATIC = FfiCode(
+    'FFI_NATIVE_ONLY_STATIC',
+    "FfiNative annotations can only be used on static functions.",
+    correction: "Change the method to static.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_INITIALIZER_IN_STRUCT = FfiCode(
+    'FIELD_INITIALIZER_IN_STRUCT',
+    "Constructors in subclasses of 'Struct' and 'Union' can't have field initializers.",
+    correction:
+        "Try removing the field initializer and marking the field as external.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_IN_STRUCT_WITH_INITIALIZER = FfiCode(
+    'FIELD_IN_STRUCT_WITH_INITIALIZER',
+    "Fields in subclasses of 'Struct' and 'Union' can't have initializers.",
+    correction:
+        "Try removing the initializer and marking the field as external.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode FIELD_MUST_BE_EXTERNAL_IN_STRUCT = FfiCode(
+    'FIELD_MUST_BE_EXTERNAL_IN_STRUCT',
+    "Fields of 'Struct' and 'Union' subclasses must be marked external.",
+    correction: "Try adding the 'external' modifier.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the struct class
+   */
+  static const FfiCode GENERIC_STRUCT_SUBCLASS = FfiCode(
+    'GENERIC_STRUCT_SUBCLASS',
+    "The class '{0}' can't extend 'Struct' or 'Union' because it is generic.",
+    correction: "Try removing the type parameters from '{0}'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode INVALID_EXCEPTION_VALUE = FfiCode(
+    'INVALID_EXCEPTION_VALUE',
+    "The method 'Pointer.fromFunction' must not have an exceptional return value (the second argument) when the return type of the function is either 'void', 'Handle' or 'Pointer'.",
+    correction: "Try removing the exceptional return value.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode INVALID_FIELD_TYPE_IN_STRUCT = FfiCode(
+    'INVALID_FIELD_TYPE_IN_STRUCT',
+    "Fields in struct classes can't have the type '{0}'. They can only be declared as 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'.",
+    correction:
+        "Try using 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' or 'Union'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode LEAF_CALL_MUST_NOT_RETURN_HANDLE = FfiCode(
+    'LEAF_CALL_MUST_NOT_RETURN_HANDLE',
+    "FFI leaf call must not return a Handle.",
+    correction: "Try changing the return type to primitive or struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode LEAF_CALL_MUST_NOT_TAKE_HANDLE = FfiCode(
+    'LEAF_CALL_MUST_NOT_TAKE_HANDLE',
+    "FFI leaf call must not take arguments of type Handle.",
+    correction: "Try changing the argument type to primitive or struct.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISMATCHED_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'MISMATCHED_ANNOTATION_ON_STRUCT_FIELD',
+    "The annotation does not match the declared type of the field.",
+    correction:
+        "Try using a different annotation or changing the declared type to match.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_ANNOTATION_ON_STRUCT_FIELD = FfiCode(
+    'MISSING_ANNOTATION_ON_STRUCT_FIELD',
+    "Fields in a struct class must either have the type 'Pointer' or an annotation indicating the native type.",
+    correction: "Try adding an annotation.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_EXCEPTION_VALUE = FfiCode(
+    'MISSING_EXCEPTION_VALUE',
+    "The method 'Pointer.fromFunction' must have an exceptional return value (the second argument) when the return type of the function is neither 'void', 'Handle' or 'Pointer'.",
+    correction: "Try adding an exceptional return value.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode MISSING_FIELD_TYPE_IN_STRUCT = FfiCode(
+    'MISSING_FIELD_TYPE_IN_STRUCT',
+    "Fields in struct classes must have an explicitly declared type of 'int', 'double' or 'Pointer'.",
+    correction: "Try using 'int', 'double' or 'Pointer'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode MISSING_SIZE_ANNOTATION_CARRAY = FfiCode(
+    'MISSING_SIZE_ANNOTATION_CARRAY',
+    "'Array's must have exactly one 'Array' annotation.",
+    correction: "Try adding a 'Array' annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a valid dart:ffi native type.
+   * 1: the name of the function whose invocation depends on this relationship
+   */
+  static const FfiCode MUST_BE_A_NATIVE_FUNCTION_TYPE = FfiCode(
+    'MUST_BE_A_NATIVE_FUNCTION_TYPE',
+    "The type '{0}' given to '{1}' must be a valid 'dart:ffi' native function type.",
+    correction: "Try changing the type to only use members for 'dart:ffi'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a subtype
+   * 1: the supertype that the subtype is compared to
+   * 2: the name of the function whose invocation depends on this relationship
+   */
+  static const FfiCode MUST_BE_A_SUBTYPE = FfiCode(
+    'MUST_BE_A_SUBTYPE',
+    "The type '{0}' must be a subtype of '{1}' for '{2}'.",
+    correction: "Try changing one or both of the type arguments.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the function, method, or constructor having type arguments
+   */
+  static const FfiCode NON_CONSTANT_TYPE_ARGUMENT = FfiCode(
+    'NON_CONSTANT_TYPE_ARGUMENT',
+    "The type arguments to '{0}' must be compile time constants but type parameters are not constants.",
+    correction: "Try changing the type argument to be a constant type.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type that should be a valid dart:ffi native type.
+   */
+  static const FfiCode NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER = FfiCode(
+    'NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER',
+    "The type argument for the pointer '{0}' must be a 'NativeFunction' in order to use 'asFunction'.",
+    correction: "Try changing the type argument to be a 'NativeFunction'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode NON_POSITIVE_ARRAY_DIMENSION = FfiCode(
+    'NON_POSITIVE_ARRAY_DIMENSION',
+    "Array dimensions must be positive numbers.",
+    correction: "Try changing the input to a positive number.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the type of the field
+   */
+  static const FfiCode NON_SIZED_TYPE_ARGUMENT = FfiCode(
+    'NON_SIZED_TYPE_ARGUMENT',
+    "Type arguments to '{0}' can't have the type '{1}'. They can only be declared as native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'.",
+    correction:
+        "Try using a native integer, 'Float', 'Double', 'Pointer', or subtype of 'Struct' or 'Union'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode PACKED_ANNOTATION = FfiCode(
+    'PACKED_ANNOTATION',
+    "Structs must have at most one 'Packed' annotation.",
+    correction: "Try removing extra 'Packed' annotations.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode PACKED_ANNOTATION_ALIGNMENT = FfiCode(
+    'PACKED_ANNOTATION_ALIGNMENT',
+    "Only packing to 1, 2, 4, 8, and 16 bytes is supported.",
+    correction:
+        "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the outer struct
+   * 1: the name of the struct being nested
+   */
+  static const FfiCode PACKED_NESTING_NON_PACKED = FfiCode(
+    'PACKED_NESTING_NON_PACKED',
+    "Nesting the non-packed or less tightly packed struct '{0}' in a packed struct '{1}' is not supported.",
+    correction:
+        "Try packing the nested struct or packing the nested struct more tightly.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const FfiCode SIZE_ANNOTATION_DIMENSIONS = FfiCode(
+    'SIZE_ANNOTATION_DIMENSIONS',
+    "'Array's must have an 'Array' annotation that matches the dimensions.",
+    correction: "Try adjusting the arguments in the 'Array' annotation.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_EXTENDS = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't extend '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_EXTENDS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't implement '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_FFI_CLASS_IN_WITH = FfiCode(
+    'SUBTYPE_OF_FFI_CLASS',
+    "The class '{0}' can't mix in '{1}'.",
+    correction: "Try extending 'Struct' or 'Union'.",
+    uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_WITH',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't extend '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't implement '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the subclass
+   * 1: the name of the class being extended, implemented, or mixed in
+   */
+  static const FfiCode SUBTYPE_OF_STRUCT_CLASS_IN_WITH = FfiCode(
+    'SUBTYPE_OF_STRUCT_CLASS',
+    "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of 'Struct' or 'Union'.",
+    correction: "Try extending 'Struct' or 'Union' directly.",
+    uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_WITH',
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const FfiCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'FfiCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.COMPILE_TIME_ERROR.severity;
+
+  @override
+  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index f881032..2ef3842 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -2,3881 +2,4 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/analyzer_error_code.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The hints and coding recommendations for best practices which are not
- * mentioned in the Dart Language Specification.
- */
-class HintCode extends AnalyzerErrorCode {
-  /**
-   * Parameters:
-   * 0: the name of the actual argument type
-   * 1: the name of the expected function return type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation of
-  // `Future.catchError` has an argument that is a function whose parameters
-  // aren't compatible with the arguments that will be passed to the function
-  // when it's invoked. The static type of the first argument to `catchError`
-  // is just `Function`, even though the function that is passed in is expected
-  // to have either a single parameter of type `Object` or two parameters of
-  // type `Object` and `StackTrace`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` doesn't take any parameters, but the function is
-  // required to take at least one parameter:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!() => 0!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` takes three parameters, but it can't have more than
-  // two required parameters:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!(one, two, three) => 0!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because even though the closure
-  // being passed to `catchError` takes one parameter, the closure doesn't have
-  // a type that is compatible with `Object`:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError([!(String error) => 0!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the function being passed to `catchError` so that it has either one
-  // or two required parameters, and the parameters have the required types:
-  //
-  // ```dart
-  // void f(Future<int> f) {
-  //   f.catchError((Object error) => 0);
-  // }
-  // ```
-  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER =
-      HintCode(
-          'ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER',
-          "The argument type '{0}' can't be assigned to the parameter type "
-              "'{1} Function(Object)' or '{1} Function(Object, StackTrace)'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Users should not assign values marked `@doNotStore`.
-   */
-  static const HintCode ASSIGNMENT_OF_DO_NOT_STORE = HintCode(
-      'ASSIGNMENT_OF_DO_NOT_STORE',
-      "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.",
-      correction: "Try removing the assignment.");
-
-  /**
-   * When the target expression uses '?.' operator, it can be `null`, so all the
-   * subsequent invocations should also use '?.' operator.
-   */
-  static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = HintCode(
-      'CAN_BE_NULL_AFTER_NULL_AWARE',
-      "The receiver uses '?.', so its value can be null.",
-      correction: "Replace the '.' with a '?.' in the invocation.");
-
-  /**
-   * Dead code is code that is never reached, this can happen for instance if a
-   * statement follows a return statement.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when code is found that won't be
-  // executed because execution will never reach the code.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the invocation of
-  // `print` occurs after the function has returned:
-  //
-  // ```dart
-  // void f() {
-  //   return;
-  //   [!print('here');!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the code isn't needed, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   return;
-  // }
-  // ```
-  //
-  // If the code needs to be executed, then either move the code to a place
-  // where it will be executed:
-  //
-  // ```dart
-  // void f() {
-  //   print('here');
-  //   return;
-  // }
-  // ```
-  //
-  // Or, rewrite the code before it, so that it can be reached:
-  //
-  // ```dart
-  // void f({bool skipPrinting = true}) {
-  //   if (skipPrinting) {
-  //     return;
-  //   }
-  //   print('here');
-  // }
-  // ```
-  static const HintCode DEAD_CODE = HintCode('DEAD_CODE', "Dead code.",
-      correction: "Try removing the code, or "
-          "fixing the code before it so that it can be reached.",
-      hasPublishedDocs: true);
-
-  /**
-   * Dead code is code that is never reached. This case covers cases where the
-   * user has catch clauses after `catch (e)` or `on Object catch (e)`.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found that
-  // can't be executed because it’s after a `catch` clause of the form
-  // `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
-  // the thrown object is selected, and both of those forms will match any
-  // object, so no `catch` clauses that follow them will be selected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } catch (e) {
-  //   } [!on String {
-  //   }!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the clause should be selectable, then move the clause before the general
-  // clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on String {
-  //   } catch (e) {
-  //   }
-  // }
-  // ```
-  //
-  // If the clause doesn't need to be selectable, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } catch (e) {
-  //   }
-  // }
-  // ```
-  static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = HintCode(
-      'DEAD_CODE_CATCH_FOLLOWING_CATCH',
-      "Dead code: Catch clauses after a 'catch (e)' or an "
-          "'on Object catch (e)' are never reached.",
-      correction:
-          "Try reordering the catch clauses so that they can be reached, or "
-          "removing the unreachable catch clauses.",
-      hasPublishedDocs: true);
-
-  /**
-   * Dead code is code that is never reached. This case covers cases where the
-   * user has an on-catch clause such as `on A catch (e)`, where a supertype of
-   * `A` was already caught.
-   *
-   * Parameters:
-   * 0: name of the subtype
-   * 1: name of the supertype
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found that
-  // can't be executed because it is after a `catch` clause that catches either
-  // the same type or a supertype of the clause's type. The first `catch` clause
-  // that matches the thrown object is selected, and the earlier clause always
-  // matches anything matchable by the highlighted clause, so the highlighted
-  // clause will never be selected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on num {
-  //   } [!on int {
-  //   }!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the clause should be selectable, then move the clause before the general
-  // clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on int {
-  //   } on num {
-  //   }
-  // }
-  // ```
-  //
-  // If the clause doesn't need to be selectable, then remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //   } on num {
-  //   }
-  // }
-  // ```
-  static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = HintCode(
-      'DEAD_CODE_ON_CATCH_SUBTYPE',
-      "Dead code: This on-catch block won’t be executed because '{0}' is a "
-          "subtype of '{1}' and hence will have been caught already.",
-      correction:
-          "Try reordering the catch clauses so that this block can be reached, "
-          "or removing the unreachable catch clause.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class `Function` is used in
-  // either the `extends`, `implements`, or `with` clause of a class or mixin.
-  // Using the class `Function` in this way has no semantic value, so it's
-  // effectively dead code.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `Function` is used as
-  // the superclass of `F`:
-  //
-  // ```dart
-  // class F extends [!Function!] {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the class `Function` from whichever clause it's in, and remove the
-  // whole clause if `Function` is the only type in the clause:
-  //
-  // ```dart
-  // class F {}
-  // ```
-  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION', "Extending 'Function' is deprecated.",
-      correction: "Try removing 'Function' from the 'extends' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_EXTENDS_FUNCTION');
-
-  /**
-   * Users should not create a class named `Function` anymore.
-   */
-  static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = HintCode(
-      'DEPRECATED_FUNCTION_CLASS_DECLARATION',
-      "Declaring a class named 'Function' is deprecated.",
-      correction: "Try renaming the class.");
-
-  /**
-   * No parameters.
-   */
-  static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION',
-      "Implementing 'Function' has no effect.",
-      correction: "Try removing 'Function' from the 'implements' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_IMPLEMENTS_FUNCTION');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a deprecated library or class
-  // member is used in a different package.
-  //
-  // #### Examples
-  //
-  // If the method `m` in the class `C` is annotated with `@deprecated`, then
-  // the following code produces this diagnostic:
-  //
-  // ```dart
-  // void f(C c) {
-  //   c.[!m!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The documentation for declarations that are annotated with `@deprecated`
-  // should indicate what code to use in place of the deprecated code.
-  static const HintCode DEPRECATED_MEMBER_USE = HintCode(
-      'DEPRECATED_MEMBER_USE', "'{0}' is deprecated and shouldn't be used.",
-      correction: "Try replacing the use of the deprecated member with the "
-          "replacement.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a deprecated library member or
-  // class member is used in the same package in which it's declared.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is deprecated:
-  //
-  // ```dart
-  // @deprecated
-  // var x = 0;
-  // var y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // The fix depends on what's been deprecated and what the replacement is. The
-  // documentation for deprecated declarations should indicate what code to use
-  // in place of the deprecated code.
-  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE = HintCode(
-      'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
-      "'{0}' is deprecated and shouldn't be used.",
-      correction: "Try replacing the use of the deprecated member with the "
-          "replacement.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: message details
-   */
-  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE =
-      HintCode(
-    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
-    "'{0}' is deprecated and shouldn't be used. {1}.",
-    correction: "Try replacing the use of the deprecated member with the "
-        "replacement.",
-    hasPublishedDocs: true,
-    uniqueName: 'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: message details
-   */
-  static const HintCode DEPRECATED_MEMBER_USE_WITH_MESSAGE = HintCode(
-    'DEPRECATED_MEMBER_USE',
-    "'{0}' is deprecated and shouldn't be used. {1}.",
-    correction: "Try replacing the use of the deprecated member with the "
-        "replacement.",
-    hasPublishedDocs: true,
-    uniqueName: 'DEPRECATED_MEMBER_USE_WITH_MESSAGE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode DEPRECATED_MIXIN_FUNCTION = HintCode(
-      'DEPRECATED_SUBTYPE_OF_FUNCTION', "Mixing in 'Function' is deprecated.",
-      correction: "Try removing 'Function' from the 'with' clause.",
-      hasPublishedDocs: true,
-      uniqueName: 'DEPRECATED_MIXIN_FUNCTION');
-
-  /**
-   * Hint to use the ~/ operator.
-   */
-  static const HintCode DIVISION_OPTIMIZATION = HintCode(
-      'DIVISION_OPTIMIZATION',
-      "The operator x ~/ y is more efficient than (x / y).toInt().",
-      correction: "Try re-writing the expression to use the '~/' operator.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name occurs multiple times in
-  // a `hide` clause. Repeating the name is unnecessary.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `min` is
-  // hidden more than once:
-  //
-  // ```dart
-  // import 'dart:math' hide min, [!min!];
-  //
-  // var x = pi;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name was mistyped in one or more places, then correct the mistyped
-  // names:
-  //
-  // ```dart
-  // import 'dart:math' hide max, min;
-  //
-  // var x = pi;
-  // ```
-  //
-  // If the name wasn't mistyped, then remove the unnecessary name from the
-  // list:
-  //
-  // ```dart
-  // import 'dart:math' hide min;
-  //
-  // var x = pi;
-  // ```
-  static const HintCode DUPLICATE_HIDDEN_NAME =
-      HintCode('DUPLICATE_HIDDEN_NAME', "Duplicate hidden name.",
-          correction: "Try removing the repeated name from the list of hidden "
-              "members.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the diagnostic being ignored
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a diagnostic name appears in an
-  // `ignore` comment, but the diagnostic is already being ignored, either
-  // because it's already included in the same `ignore` comment or because it
-  // appears in an `ignore-in-file` comment.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the diagnostic named
-  // `unused_local_variable` is already being ignored for the whole file so it
-  // doesn't need to be ignored on a specific line:
-  //
-  // ```dart
-  // // ignore_for_file: unused_local_variable
-  // void f() {
-  //   // ignore: [!unused_local_variable!]
-  //   var x = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the diagnostic named
-  // `unused_local_variable` is being ignored twice on the same line:
-  //
-  // ```dart
-  // void f() {
-  //   // ignore: unused_local_variable, [!unused_local_variable!]
-  //   var x = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the ignore comment, or remove the unnecessary diagnostic name if the
-  // ignore comment is ignoring more than one diagnostic:
-  //
-  // ```dart
-  // // ignore_for_file: unused_local_variable
-  // void f() {
-  //   var x = 0;
-  // }
-  // ```
-  static const HintCode DUPLICATE_IGNORE = HintCode(
-      'DUPLICATE_IGNORE',
-      "The diagnostic '{0}' doesn't need to be ignored here because it's "
-          "already being ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.",
-      hasPublishedDocs: true);
-
-  /**
-   * Duplicate imports.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import directive is found
-  // that is the same as an import before it in the file. The second import
-  // doesn’t add value and should be removed.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  // import [!'package:meta/meta.dart'!];
-  //
-  // @sealed class C {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary import:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @sealed class C {}
-  // ```
-  static const HintCode DUPLICATE_IMPORT = HintCode(
-      'DUPLICATE_IMPORT', "Duplicate import.",
-      correction: "Try removing all but one import of the library.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name occurs multiple times in
-  // a `show` clause. Repeating the name is unnecessary.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the name `min` is shown
-  // more than once:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!min!];
-  //
-  // var x = min(2, min(0, 1));
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the name was mistyped in one or more places, then correct the mistyped
-  // names:
-  //
-  // ```dart
-  // import 'dart:math' show max, min;
-  //
-  // var x = max(2, min(0, 1));
-  // ```
-  //
-  // If the name wasn't mistyped, then remove the unnecessary name from the
-  // list:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(2, min(0, 1));
-  // ```
-  static const HintCode DUPLICATE_SHOWN_NAME =
-      HintCode('DUPLICATE_SHOWN_NAME', "Duplicate shown name.",
-          correction: "Try removing the repeated name from the list of shown "
-              "members.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an element in a non-constant set
-  // is the same as a previous element in the same set. If two elements are the
-  // same, then the second value is ignored, which makes having both elements
-  // pointless and likely signals a bug.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the element `1` appears
-  // twice:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 1;
-  // var s = <int>{a, [!b!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If both elements should be included in the set, then change one of the
-  // elements:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 2;
-  // var s = <int>{a, b};
-  // ```
-  //
-  // If only one of the elements is needed, then remove the one that isn't
-  // needed:
-  //
-  // ```dart
-  // const a = 1;
-  // var s = <int>{a};
-  // ```
-  //
-  // Note that literal sets preserve the order of their elements, so the choice
-  // of which element to remove might affect the order in which elements are
-  // returned by an iterator.
-  static const HintCode EQUAL_ELEMENTS_IN_SET = HintCode(
-      'EQUAL_ELEMENTS_IN_SET',
-      "Two elements in a set literal shouldn't be equal.",
-      correction: "Change or remove the duplicate element.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a key in a non-constant map is
-  // the same as a previous key in the same map. If two keys are the same, then
-  // the second value overwrites the first value, which makes having both pairs
-  // pointless and likely signals a bug.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the keys `a` and `b`
-  // have the same value:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 1;
-  // var m = <int, String>{a: 'a', [!b!]: 'b'};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If both entries should be included in the map, then change one of the keys:
-  //
-  // ```dart
-  // const a = 1;
-  // const b = 2;
-  // var m = <int, String>{a: 'a', b: 'b'};
-  // ```
-  //
-  // If only one of the entries is needed, then remove the one that isn't
-  // needed:
-  //
-  // ```dart
-  // const a = 1;
-  // var m = <int, String>{a: 'a'};
-  // ```
-  //
-  // Note that literal maps preserve the order of their entries, so the choice
-  // of which entry to remove might affect the order in which the keys and
-  // values are returned by an iterator.
-  static const HintCode EQUAL_KEYS_IN_MAP = HintCode(
-      'EQUAL_KEYS_IN_MAP', "Two keys in a map literal shouldn't be equal.",
-      correction: "Change or remove the duplicate key.",
-      hasPublishedDocs: true);
-
-  /**
-   * It is a bad practice for a source file in a package "lib" directory
-   * hierarchy to traverse outside that directory hierarchy. For example, a
-   * source file in the "lib" directory should not contain a directive such as
-   * `import '../web/some.dart'` which references a file outside the lib
-   * directory.
-   */
-  static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE =
-      HintCode(
-          'FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE',
-          "A file in the 'lib' directory shouldn't import a file outside the "
-              "'lib' directory.",
-          correction: "Try removing the import, or "
-              "moving the imported file inside the 'lib' directory.");
-
-  /**
-   * It is a bad practice for a source file ouside a package "lib" directory
-   * hierarchy to traverse into that directory hierarchy. For example, a source
-   * file in the "web" directory should not contain a directive such as
-   * `import '../lib/some.dart'` which references a file inside the lib
-   * directory.
-   */
-  static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE =
-      HintCode(
-          'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE',
-          "A file outside the 'lib' directory shouldn't reference a file "
-              "inside the 'lib' directory using a relative path.",
-          correction: "Try using a package: URI instead.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library that declares a
-  // function named `loadLibrary` is imported using a deferred import. A
-  // deferred import introduces an implicit function named `loadLibrary`. This
-  // function is used to load the contents of the deferred library, and the
-  // implicit function hides the explicit declaration in the deferred library.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // Given a file (`a.dart`) that defines a function named `loadLibrary`:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // void loadLibrary(Library library) {}
-  //
-  // class Library {}
-  // ```
-  //
-  // The following code produces this diagnostic because the implicit
-  // declaration of `a.loadLibrary` is hiding the explicit declaration of
-  // `loadLibrary` in `a.dart`:
-  //
-  // ```dart
-  // [!import 'a.dart' deferred as a;!]
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the imported library isn't required to be deferred, then remove the
-  // keyword `deferred`:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // If the imported library is required to be deferred and you need to
-  // reference the imported function, then rename the function in the imported
-  // library:
-  //
-  // ```dart
-  // void populateLibrary(Library library) {}
-  //
-  // class Library {}
-  // ```
-  //
-  // If the imported library is required to be deferred and you don't need to
-  // reference the imported function, then add a `hide` clause:
-  //
-  // ```dart
-  // import 'a.dart' deferred as a hide loadLibrary;
-  //
-  // void f() {
-  //   a.Library();
-  // }
-  // ```
-  //
-  // If type arguments shouldn't be required for the class, then mark the class
-  // with the `@optionalTypeArgs` annotation (from `package:meta`):
-  static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = HintCode(
-      'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION',
-      "The imported library defines a top-level function named 'loadLibrary' "
-          "that is hidden by deferring this library.",
-      correction: "Try changing the import to not be deferred, or "
-          "rename the function in the imported library.",
-      hasPublishedDocs: true);
-
-  /**
-   * https://github.com/dart-lang/sdk/issues/44063
-   */
-  static const HintCode IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE = HintCode(
-    'IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE',
-    "The library '{0}' is legacy, and should not be imported into "
-        "a null safe library.",
-    correction: "Try migrating the imported library.",
-  );
-
-  /**
-   * When "strict-inference" is enabled, collection literal types must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_COLLECTION_LITERAL = HintCode(
-      'INFERENCE_FAILURE_ON_COLLECTION_LITERAL',
-      "The type argument(s) of '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in function invocations must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_INVOCATION = HintCode(
-      'INFERENCE_FAILURE_ON_FUNCTION_INVOCATION',
-      "The type argument(s) of the function '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, recursive local functions, top-level
-   * functions, methods, and function-typed function parameters must all
-   * specify a return type. See the strict-inference resource:
-   *
-   * https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md
-   */
-  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE = HintCode(
-      'INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE',
-      "The return type of '{0}' cannot be inferred.",
-      correction: "Declare the return type of '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in function invocations must be
-   * inferred via the context type, or have type arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_GENERIC_INVOCATION = HintCode(
-      'INFERENCE_FAILURE_ON_GENERIC_INVOCATION',
-      "The type argument(s) of the generic function type '{0}' can't be "
-          "inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" is enabled, types in instance creation
-   * (constructor calls) must be inferred via the context type, or have type
-   * arguments.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
-      'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
-      "The type argument(s) of the constructor '{0}' can't be inferred.",
-      correction: "Use explicit type argument(s) for '{0}'.");
-
-  /**
-   * When "strict-inference" in enabled, uninitialized variables must be
-   * declared with a specific type.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE = HintCode(
-      'INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE',
-      "The type of {0} can't be inferred without either a type or "
-          "initializer.",
-      correction: "Try specifying the type of the variable.");
-
-  /**
-   * When "strict-inference" in enabled, function parameters must be
-   * declared with a specific type, or inherit a type.
-   */
-  static const HintCode INFERENCE_FAILURE_ON_UNTYPED_PARAMETER = HintCode(
-      'INFERENCE_FAILURE_ON_UNTYPED_PARAMETER',
-      "The type of {0} can't be inferred; a type must be explicitly provided.",
-      correction: "Try specifying the type of the parameter.");
-
-  /**
-   * Parameters:
-   * 0: the name of the annotation
-   * 1: the list of valid targets
-   */
-  static const HintCode INVALID_ANNOTATION_TARGET = HintCode(
-      'INVALID_ANNOTATION_TARGET',
-      "The annotation '{0}' can only be used on {1}");
-
-  /**
-   * This hint is generated anywhere where an element annotated with `@internal`
-   * is exported as a part of a package's public API.
-   *
-   * Parameters:
-   * 0: the name of the element
-   */
-  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT = HintCode(
-      'INVALID_EXPORT_OF_INTERNAL_ELEMENT',
-      "The member '{0}' can't be exported as a part of a package's public "
-          "API.",
-      correction: "Try using a hide clause to hide '{0}'.");
-
-  /**
-   * This hint is generated anywhere where an element annotated with `@internal`
-   * is exported indirectly as a part of a package's public API.
-   *
-   * Parameters:
-   * 0: the name of the element
-   */
-  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY = HintCode(
-      'INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY',
-      "The member '{0}' can't be exported as a part of a package's public "
-          "API, but is indirectly exported as part of the signature of '{1}'.",
-      correction: "Try using a hide clause to hide '{0}'.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * anything other than a method.
-   */
-  static const HintCode INVALID_FACTORY_ANNOTATION = HintCode(
-      'INVALID_FACTORY_ANNOTATION',
-      "Only methods can be annotated as factories.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * a method that does not declare a return type.
-   */
-  static const HintCode INVALID_FACTORY_METHOD_DECL = HintCode(
-      'INVALID_FACTORY_METHOD_DECL',
-      "Factory method '{0}' must have a return type.");
-
-  /**
-   * This hint is generated anywhere a @factory annotation is associated with
-   * a non-abstract method that can return anything other than a newly allocated
-   * object.
-   *
-   * Parameters:
-   * 0: the name of the method
-   */
-  static const HintCode INVALID_FACTORY_METHOD_IMPL = HintCode(
-      'INVALID_FACTORY_METHOD_IMPL',
-      "Factory method '{0}' doesn't return a newly allocated object.");
-
-  /**
-   * This hint is generated anywhere an @immutable annotation is associated with
-   * anything other than a class.
-   */
-  static const HintCode INVALID_IMMUTABLE_ANNOTATION = HintCode(
-      'INVALID_IMMUTABLE_ANNOTATION',
-      "Only classes can be annotated as being immutable.");
-
-  /**
-   * This hint is generated anywhere a @internal annotation is associated with
-   * an element found in a package's public API.
-   */
-  static const HintCode INVALID_INTERNAL_ANNOTATION = HintCode(
-      'INVALID_INTERNAL_ANNOTATION',
-      "Only public elements in a package's private API can be annotated as "
-          "being internal.");
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override number must begin with '@dart'",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override comment must be specified with "
-        "an '=' character",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
-  );
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The language version override can't specify a version greater than the "
-        "latest known language version: {0}.{1}",
-    correction: "Try removing the language version override.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
-  );
-
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The language version override must be before any declaration or "
-        "directive.",
-    correction:
-        "Try moving the language version override to the top of the file.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override comment must be specified with "
-        "the word 'dart' in all lower case",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override comment must be specified with a "
-        "version number, like '2.0', after the '=' character.",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX = HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override number can't be prefixed with "
-        "a letter",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS =
-      HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    "The Dart language version override comment can't be followed by "
-        "any non-whitespace characters",
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
-  );
-
-  /// Invalid Dart language version comments don't follow the specification [1].
-  /// If a comment begins with "@dart" or "dart" (letters in any case),
-  /// followed by optional whitespace, followed by optional non-alphanumeric,
-  /// non-whitespace characters, followed by optional whitespace, followed by
-  /// an optional alphabetical character, followed by a digit, then the
-  /// comment is considered to be an attempt at a language version override
-  /// comment. If this attempted language version override comment is not a
-  /// valid language version override comment, it is reported.
-  ///
-  /// [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
-  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES =
-      HintCode(
-    'INVALID_LANGUAGE_VERSION_OVERRIDE',
-    'The Dart language version override comment must be specified with '
-        'exactly two slashes.',
-    correction: "Specify a Dart language version override with a comment "
-        "like '// @dart = 2.0'.",
-    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the `@literal` annotation is
-  // applied to anything other than a const constructor.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the constructor isn't
-  // a `const` constructor:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   [!@literal!]
-  //   C();
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `x` isn't a
-  // constructor:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // [!@literal!]
-  // var x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the annotation is on a constructor and the constructor should always be
-  // invoked with `const`, when possible, then mark the constructor with the
-  // `const` keyword:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  // ```
-  //
-  // If the constructor can't be marked as `const`, then remove the annotation.
-  //
-  // If the annotation is on anything other than a constructor, then remove the
-  // annotation:
-  //
-  // ```dart
-  // var x;
-  // ```
-  static const HintCode INVALID_LITERAL_ANNOTATION = HintCode(
-      'INVALID_LITERAL_ANNOTATION',
-      "Only const constructors can have the `@literal` annotation.",
-      hasPublishedDocs: true);
-
-  /**
-   * This hint is generated anywhere where `@nonVirtual` annotates something
-   * other than a non-abstract instance member in a class or mixin.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_NON_VIRTUAL_ANNOTATION = HintCode(
-      'INVALID_NON_VIRTUAL_ANNOTATION',
-      "The member '{0}' can't be '@nonVirtual' because it isn't a concrete "
-          "instance member.",
-      correction: "Try removing @nonVirtual.");
-
-  /**
-   * This hint is generated anywhere where an instance member annotated with
-   * `@nonVirtual` is overridden in a subclass.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER = HintCode(
-      'INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER',
-      "The member '{0}' is declared non-virtual in '{1}' and can't be "
-          "overridden in subclasses.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a named
-   * parameter with a default value.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_NAMED_PARAM = HintCode(
-      'INVALID_REQUIRED_NAMED_PARAM',
-      "The type parameter '{0}' is annotated with @required but only named "
-          "parameters without a default value can be annotated with it.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates an optional
-   * positional parameter.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM = HintCode(
-      'INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM',
-      "Incorrect use of the annotation @required on the optional "
-          "positional parameter '{0}'. Optional positional parameters "
-          "cannot be required.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a non named
-   * parameter or a named parameter with default value.
-   *
-   * Parameters:
-   * 0: the name of the member
-   *
-   * Deprecated: Use the more specific [INVALID_REQUIRED_NAMED_PARAM],
-   * [INVALID_REQUIRED_OPTIONAL_POSITION_PARAM], and
-   * [INVALID_REQUIRED_POSITION_PARAM]
-   */
-  @deprecated
-  static const HintCode INVALID_REQUIRED_PARAM = HintCode(
-      'INVALID_REQUIRED_PARAM',
-      "The type parameter '{0}' is annotated with @required but only named "
-          "parameters without default value can be annotated with it.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@required` annotates a non optional
-   * positional parameter.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_REQUIRED_POSITIONAL_PARAM = HintCode(
-      'INVALID_REQUIRED_POSITIONAL_PARAM',
-      "Redundant use of the annotation @required on the required positional "
-          "parameter '{0}'.",
-      correction: "Remove @required.");
-
-  /**
-   * This hint is generated anywhere where `@sealed` annotates something other
-   * than a class.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_SEALED_ANNOTATION = HintCode(
-      'INVALID_SEALED_ANNOTATION',
-      "The member '{0}' is annotated with '@sealed' but only classes can be "
-          "annotated with it.",
-      correction: "Remove @sealed.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with `@internal`
-   * is used outside of the package in which it is declared.
-   *
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const HintCode INVALID_USE_OF_INTERNAL_MEMBER = HintCode(
-      'INVALID_USE_OF_INTERNAL_MEMBER',
-      "The member '{0}' can only be used within its package.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with `@protected`
-   * is used outside of an instance member of a subclass.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = HintCode(
-      'INVALID_USE_OF_PROTECTED_MEMBER',
-      "The member '{0}' can only be used within instance members of subclasses "
-          "of '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance member that is
-  // annotated with `visibleForOverriding` is referenced outside the library in
-  // which it's declared for any reason other than to override it.
-  //
-  // #### Example
-  //
-  // Given a file named `a.dart` containing the following declaration:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // import 'package:meta/meta.dart';
-  //
-  // class A {
-  //   @visibleForOverriding
-  //   void a() {}
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the method `m` is being
-  // invoked even though the only reason it's public is to allow it to be
-  // overridden:
-  //
-  // ```dart
-  // import 'a.dart';
-  //
-  // class B extends A {
-  //   void b() {
-  //     [!a!]();
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the invalid use of the member.
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER',
-      "The member '{0}' can only be used for overriding.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with
-   * `@visibleForTemplate` is used outside of a "template" Dart file.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER',
-      "The member '{0}' can only be used within '{1}' or a template "
-          "library.");
-
-  /**
-   * This hint is generated anywhere where a member annotated with
-   * `@visibleForTesting` is used outside the defining library, or a test.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the defining class
-   */
-  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER = HintCode(
-      'INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER',
-      "The member '{0}' can only be used within '{1}' or a test.");
-
-  /**
-   * This hint is generated anywhere where a private declaration is annotated
-   * with `@visibleForTemplate` or `@visibleForTesting`.
-   *
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the annotation
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when either the `@visibleForTemplate`
-  // or `@visibleForTesting` annotation is applied to a non-public declaration.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // [!@visibleForTesting!]
-  // void _someFunction() {}
-  //
-  // void f() => _someFunction();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the declaration doesn't need to be used by test code, then remove the
-  // annotation:
-  //
-  // ```dart
-  // void _someFunction() {}
-  //
-  // void f() => _someFunction();
-  // ```
-  //
-  // If it does, then make it public:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @visibleForTesting
-  // void someFunction() {}
-  //
-  // void f() => someFunction();
-  // ```
-  static const HintCode INVALID_VISIBILITY_ANNOTATION = HintCode(
-      'INVALID_VISIBILITY_ANNOTATION',
-      "The member '{0}' is annotated with '{1}', but this annotation is only "
-          "meaningful on declarations of public members.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when anything other than a public
-  // instance member of a class is annotated with `visibleForOverriding`.
-  // Because only public instance members can be overridden outside the defining
-  // library, there's no value to annotating any other declarations.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the annotation is on a
-  // class, and classes can't be overridden:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // [!@visibleForOverriding!]
-  // class C {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the annotation:
-  //
-  // ```dart
-  // class C {}
-  // ```
-  static const HintCode INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION = HintCode(
-    'INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION',
-    "The declaration '{0}' is annotated with 'visibleForOverriding'. Because "
-        "'{0}' isn't an interface member that could be overridden, the "
-        "annotation is meaningless.",
-  );
-
-  /**
-   * Generate a hint for an element that is annotated with `@JS(...)` whose
-   * library declaration is not similarly annotated.
-   */
-  static const HintCode MISSING_JS_LIB_ANNOTATION = HintCode(
-      'MISSING_JS_LIB_ANNOTATION',
-      "The @JS() annotation can only be used if it is also declared on the "
-          "library directive.",
-      correction: "Try adding the annotation to the library directive.");
-
-  /**
-   * Generate a hint for a constructor, function or method invocation where a
-   * required parameter is missing.
-   *
-   * Parameters:
-   * 0: the name of the parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function with a
-  // named parameter that is annotated as being required is invoked without
-  // providing a value for the parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the named parameter `x`
-  // is required:
-  //
-  // ```dart
-  // %language=2.9
-  // import 'package:meta/meta.dart';
-  //
-  // void f({@required int x}) {}
-  //
-  // void g() {
-  //   [!f!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Provide the required value:
-  //
-  // ```dart
-  // %language=2.9
-  // import 'package:meta/meta.dart';
-  //
-  // void f({@required int x}) {}
-  //
-  // void g() {
-  //   f(x: 2);
-  // }
-  // ```
-  static const HintCode MISSING_REQUIRED_PARAM = HintCode(
-      'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for a constructor, function or method invocation where a
-   * required parameter is missing.
-   *
-   * Parameters:
-   * 0: the name of the parameter
-   * 1: message details
-   */
-  static const HintCode MISSING_REQUIRED_PARAM_WITH_DETAILS = HintCode(
-    'MISSING_REQUIRED_PARAM',
-    "The parameter '{0}' is required. {1}.",
-    hasPublishedDocs: true,
-    uniqueName: 'MISSING_REQUIRED_PARAM_WITH_DETAILS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the declared return type
-   */
-  // #### Description
-  //
-  // Any function or method that doesn't end with either an explicit return or a
-  // throw implicitly returns `null`. This is rarely the desired behavior. The
-  // analyzer produces this diagnostic when it finds an implicit return.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` doesn't end with a
-  // return:
-  //
-  // ```dart
-  // %language=2.9
-  // int [!f!](int x) {
-  //   if (x < 0) {
-  //     return 0;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add a `return` statement that makes the return value explicit, even if
-  // `null` is the appropriate value.
-  static const HintCode MISSING_RETURN = HintCode(
-      'MISSING_RETURN',
-      "This function has a return type of '{0}', but doesn't end with a "
-          "return statement.",
-      correction: "Try adding a return statement, "
-          "or changing the return type to 'void'.",
-      hasPublishedDocs: true);
-
-  /**
-   * This hint is generated anywhere where a `@sealed` class is used as a
-   * a superclass constraint of a mixin.
-   *
-   * Parameters:
-   * 0: the name of the sealed class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the superclass constraint of a
-  // mixin is a class from a different package that was marked as `@sealed`.
-  // Classes that are sealed can't be extended, implemented, mixed in, or used
-  // as a superclass constraint.
-  //
-  // #### Examples
-  //
-  // If the package `p` defines a sealed class:
-  //
-  // ```dart
-  // %uri="package:p/p.dart"
-  // import 'package:meta/meta.dart';
-  //
-  // @sealed
-  // class C {}
-  // ```
-  //
-  // Then, the following code, when in a package other than `p`, produces this
-  // diagnostic:
-  //
-  // ```dart
-  // import 'package:p/p.dart';
-  //
-  // [!mixin M on C {}!]
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the classes that use the mixin don't need to be subclasses of the sealed
-  // class, then consider adding a field and delegating to the wrapped instance
-  // of the sealed class.
-  static const HintCode MIXIN_ON_SEALED_CLASS = HintCode(
-      'MIXIN_ON_SEALED_CLASS',
-      "The class '{0}' shouldn't be used as a mixin constraint because it is "
-          "sealed, and any class mixing in this mixin must have '{0}' as a "
-          "superclass.",
-      correction:
-          "Try composing with this class, or refer to its documentation for "
-          "more information.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for classes that inherit from classes annotated with
-   * `@immutable` but that are not immutable.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an immutable class defines one
-  // or more instance fields that aren't final. A class is immutable if it's
-  // marked as being immutable using the annotation `@immutable` or if it's a
-  // subclass of an immutable class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field `x` isn't
-  // final:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @immutable
-  // class [!C!] {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If instances of the class should be immutable, then add the keyword `final`
-  // to all non-final field declarations:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @immutable
-  // class C {
-  //   final int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  //
-  // If the instances of the class should be mutable, then remove the
-  // annotation, or choose a different superclass if the annotation is
-  // inherited:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  static const HintCode MUST_BE_IMMUTABLE = HintCode(
-      'MUST_BE_IMMUTABLE',
-      "This class (or a class that this class inherits from) is marked as "
-          "'@immutable', but one or more of its instance fields aren't final: "
-          "{0}",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the class declaring the overridden method
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method that overrides a method
-  // that is annotated as `@mustCallSuper` doesn't invoke the overridden method
-  // as required.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the method `m` in `B`
-  // doesn't invoke the overridden method `m` in `A`:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class A {
-  //   @mustCallSuper
-  //   m() {}
-  // }
-  //
-  // class B extends A {
-  //   @override
-  //   [!m!]() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an invocation of the overridden method in the overriding method:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class A {
-  //   @mustCallSuper
-  //   m() {}
-  // }
-  //
-  // class B extends A {
-  //   @override
-  //   m() {
-  //     super.m();
-  //   }
-  // }
-  // ```
-  static const HintCode MUST_CALL_SUPER = HintCode(
-      'MUST_CALL_SUPER',
-      "This method overrides a method annotated as '@mustCallSuper' in '{0}', "
-          "but doesn't invoke the overridden method.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for non-const instance creation using a constructor
-   * annotated with `@literal`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the annotated constructor
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor that has the
-  // `@literal` annotation is invoked without using the `const` keyword, but all
-  // of the arguments to the constructor are constants. The annotation indicates
-  // that the constructor should be used to create a constant value whenever
-  // possible.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  //
-  // C f() => [!C()!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add the keyword `const` before the constructor invocation:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @literal
-  //   const C();
-  // }
-  //
-  // void f() => const C();
-  // ```
-  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR = HintCode(
-      'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
-      "This instance creation must be 'const', because the {0} constructor is "
-          "marked as '@literal'.",
-      correction: "Try adding a 'const' keyword.",
-      hasPublishedDocs: true);
-
-  /**
-   * Generate a hint for non-const instance creation (with the `new` keyword)
-   * using a constructor annotated with `@literal`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the annotated constructor
-   */
-  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW =
-      HintCode(
-    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
-    "This instance creation must be 'const', because the {0} constructor "
-        "is marked as '@literal'.",
-    correction: "Try replacing the 'new' keyword with 'const'.",
-    hasPublishedDocs: true,
-    uniqueName: 'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the method being invoked
-   * 1: the type argument associated with the method
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when `null` is passed to either the
-  // constructor `Future.value` or the method `Completer.complete` when the type
-  // argument used to create the instance was non-nullable. Even though the type
-  // system can't express this restriction, passing in a `null` results in a
-  // runtime exception.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `null` is being passed
-  // to the constructor `Future.value` even though the type argument is the
-  // non-nullable type `String`:
-  //
-  // ```dart
-  // Future<String> f() {
-  //   return Future.value([!null!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Pass in a non-null value:
-  //
-  // ```dart
-  // Future<String> f() {
-  //   return Future.value('');
-  // }
-  // ```
-  static const HintCode NULL_ARGUMENT_TO_NON_NULL_TYPE = HintCode(
-      'NULL_ARGUMENT_TO_NON_NULL_TYPE',
-      "'{0}' shouldn't be called with a null argument for the non-nullable "
-          "type argument '{1}'.",
-      correction: 'Try adding a non-null argument.');
-
-  /**
-   * When the left operand of a binary expression uses '?.' operator, it can be
-   * `null`.
-   */
-  static const HintCode NULL_AWARE_BEFORE_OPERATOR = HintCode(
-      'NULL_AWARE_BEFORE_OPERATOR',
-      "The left operand uses '?.', so its value can be null.");
-
-  /**
-   * A condition in a control flow statement could evaluate to `null` because it
-   * uses the null-aware '?.' operator.
-   */
-  static const HintCode NULL_AWARE_IN_CONDITION = HintCode(
-      'NULL_AWARE_IN_CONDITION',
-      "The value of the '?.' operator can be 'null', which isn't appropriate "
-          "in a condition.",
-      correction:
-          "Try replacing the '?.' with a '.', testing the left-hand side for "
-          "null if necessary.");
-
-  /**
-   * A condition in operands of a logical operator could evaluate to `null`
-   * because it uses the null-aware '?.' operator.
-   */
-  static const HintCode NULL_AWARE_IN_LOGICAL_OPERATOR = HintCode(
-      'NULL_AWARE_IN_LOGICAL_OPERATOR',
-      "The value of the '?.' operator can be 'null', which isn't appropriate "
-          "as an operand of a logical operator.");
-
-  /**
-   * This hint indicates that a null literal is null-checked with `!`, but null
-   * is never not null.
-   */
-  static const HintCode NULL_CHECK_ALWAYS_FAILS = HintCode(
-      'NULL_CHECK_ALWAYS_FAILS',
-      "This null-check will always throw an exception because the expression "
-          "will always evaluate to 'null'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type following `on` in a
-  // `catch` clause is a nullable type. It isn't valid to specify a nullable
-  // type because it isn't possible to catch `null` (because it's a runtime
-  // error to throw `null`).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the exception type is
-  // specified to allow `null` when `null` can't be thrown:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on [!FormatException?!] {
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the question mark from the type:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } on FormatException {
-  //   }
-  // }
-  // ```
-  static const HintCode NULLABLE_TYPE_IN_CATCH_CLAUSE = HintCode(
-      'NULLABLE_TYPE_IN_CATCH_CLAUSE',
-      "A potentially nullable type can't be used in an 'on' clause because it "
-          "isn't valid to throw a nullable expression.",
-      correction: "Try using a non-nullable type.",
-      hasPublishedDocs: true);
-
-  /**
-   * A field with the override annotation does not override a getter or setter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_FIELD = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The field doesn't override an inherited getter or setter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_FIELD',
-  );
-
-  /**
-   * A getter with the override annotation does not override an existing getter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The getter doesn't override an inherited getter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_GETTER',
-  );
-
-  /**
-   * A method with the override annotation does not override an existing method.
-   *
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class member is annotated with
-  // the `@override` annotation, but the member isn’t declared in any of the
-  // supertypes of the class.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` isn't declared in
-  // any of the supertypes of `C`:
-  //
-  // ```dart
-  // class C {
-  //   @override
-  //   String [!m!]() => '';
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the member is intended to override a member with a different name, then
-  // update the member to have the same name:
-  //
-  // ```dart
-  // class C {
-  //   @override
-  //   String toString() => '';
-  // }
-  // ```
-  //
-  // If the member is intended to override a member that was removed from the
-  // superclass, then consider removing the member from the subclass.
-  //
-  // If the member can't be removed, then remove the annotation.
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The method doesn't override an inherited method.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_METHOD',
-  );
-
-  /**
-   * A setter with the override annotation does not override an existing setter.
-   *
-   * No parameters.
-   */
-  static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = HintCode(
-    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
-    "The setter doesn't override an inherited setter.",
-    correction: "Try updating this class to match the superclass, or "
-        "removing the override annotation.",
-    hasPublishedDocs: true,
-    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_SETTER',
-  );
-
-  /**
-   * It is a bad practice for a package import to reference anything outside the
-   * given package, or more generally, it is bad practice for a package import
-   * to contain a "..". For example, a source file should not contain a
-   * directive such as `import 'package:foo/../some.dart'`.
-   */
-  static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = HintCode(
-      'PACKAGE_IMPORT_CONTAINS_DOT_DOT',
-      "A package import shouldn't contain '..'.");
-
-  /**
-   * It is not an error to call or tear-off a method, setter, or getter, or to
-   * read or write a field, on a receiver of static type `Never`.
-   * Implementations that provide feedback about dead or unreachable code are
-   * encouraged to indicate that any arguments to the invocation are
-   * unreachable.
-   *
-   * It is not an error to apply an expression of type `Never` in the function
-   * position of a function call. Implementations that provide feedback about
-   * dead or unreachable code are encouraged to indicate that any arguments to
-   * the call are unreachable.
-   *
-   * Parameters: none
-   */
-  static const HintCode RECEIVER_OF_TYPE_NEVER = HintCode(
-      'RECEIVER_OF_TYPE_NEVER',
-      "The receiver is of type 'Never', and will never complete with a value.",
-      correction: "Try checking for throw expressions or type errors in the "
-          "receiver");
-
-  /**
-   * Users should not return values marked `@doNotStore` from functions,
-   * methods or getters not marked `@doNotStore`.
-   */
-  static const HintCode RETURN_OF_DO_NOT_STORE = HintCode(
-      'RETURN_OF_DO_NOT_STORE',
-      "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless "
-          "'{1}' is also annotated.",
-      correction: "Annotate '{1}' with 'doNotStore'.");
-
-  /**
-   * Parameters:
-   * 0: the return type as declared in the return statement
-   * 1: the expected return type as defined by the type of the Future
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an invocation of
-  // `Future.catchError` has an argument whose return type isn't compatible with
-  // the type returned by the instance of `Future`. At runtime, the method
-  // `catchError` attempts to return the value from the callback as the result
-  // of the future, which results in another exception being thrown.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `future` is declared to
-  // return an `int` while `callback` is declared to return a `String`, and
-  // `String` isn't a subtype of `int`:
-  //
-  // ```dart
-  // void f(Future<int> future, String Function(dynamic, StackTrace) callback) {
-  //   future.catchError([!callback!]);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the closure being
-  // passed to `catchError` returns an `int` while `future` is declared to
-  // return a `String`:
-  //
-  // ```dart
-  // void f(Future<String> future) {
-  //   future.catchError((error, stackTrace) => [!3!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the instance of `Future` is declared correctly, then change the callback
-  // to match:
-  //
-  // ```dart
-  // void f(Future<int> future, int Function(dynamic, StackTrace) callback) {
-  //   future.catchError(callback);
-  // }
-  // ```
-  //
-  // If the declaration of the instance of `Future` is wrong, then change it to
-  // match the callback:
-  //
-  // ```dart
-  // void f(Future<String> future, String Function(dynamic, StackTrace) callback) {
-  //   future.catchError(callback);
-  // }
-  // ```
-  static const HintCode RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR = HintCode(
-      'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
-      "A value of type '{0}' can't be returned by the 'onError' handler "
-          "because it must be assignable to '{1}'.",
-      hasPublishedDocs: true,
-      uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR');
-
-  /**
-   * Parameters:
-   * 0: the return type of the function
-   * 1: the expected return type as defined by the type of the Future
-   */
-  static const HintCode RETURN_TYPE_INVALID_FOR_CATCH_ERROR = HintCode(
-      'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
-      "The return type '{0}' isn't assignable to '{1}', as required by "
-          "'Future.catchError'.",
-      hasPublishedDocs: true,
-      uniqueName: 'RETURN_TYPE_INVALID_FOR_CATCH_ERROR');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an `as` expression inside a
-  // [constant context][] is found in code that has an SDK constraint whose
-  // lower bound is less than 2.3.2. Using an `as` expression in a
-  // [constant context][] wasn't supported in earlier versions, so this code
-  // won't be able to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.2:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // const num n = 3;
-  // const int i = [!n as int!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the expression to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use an `as` expression, or change the code so that the `as`
-  // expression isn't in a [constant context][]:
-  //
-  // ```dart
-  // num x = 3;
-  // int y = x as int;
-  // ```
-  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
-      "The use of an as expression in a constant expression wasn't "
-          "supported until version 2.3.2, but this code is required to be able "
-          "to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when either the class `Future` or
-  // `Stream` is referenced in a library that doesn't import `dart:async` in
-  // code that has an SDK constraint whose lower bound is less than 2.1.0. In
-  // earlier versions, these classes weren't defined in `dart:core`, so the
-  // import was necessary.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.1.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.0.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // void f([!Future!] f) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the classes to be referenced:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then import the
-  // `dart:async` library.
-  //
-  // ```dart
-  // import 'dart:async';
-  //
-  // void f(Future f) {}
-  // ```
-  static const HintCode SDK_VERSION_ASYNC_EXPORTED_FROM_CORE = HintCode(
-      'SDK_VERSION_ASYNC_EXPORTED_FROM_CORE',
-      "The class '{0}' wasn't exported from 'dart:core' until version 2.1, "
-          "but this code is required to be able to run on earlier versions.",
-      correction:
-          "Try either importing 'dart:async' or updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when any use of the `&`, `|`, or `^`
-  // operators on the class `bool` inside a [constant context][] is found in
-  // code that has an SDK constraint whose lower bound is less than 2.3.2. Using
-  // these operators in a [constant context][] wasn't supported in earlier
-  // versions, so this code won't be able to run against earlier versions of the
-  // SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.2:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // const bool a = true;
-  // const bool b = false;
-  // const bool c = a [!&!] b;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operators to be used:
-  //
-  // ```yaml
-  // environment:
-  //  sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use these operators, or change the code so that the expression
-  // isn't in a [constant context][]:
-  //
-  // ```dart
-  // const bool a = true;
-  // const bool b = false;
-  // bool c = a & b;
-  // ```
-  static const HintCode SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT',
-      "The use of the operator '{0}' for 'bool' operands in a constant context "
-          "wasn't supported until version 2.3.2, but this code is required to "
-          "be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   *
-   * There is also a [ParserError.EXPERIMENT_NOT_ENABLED] code which catches
-   * some cases of constructor tearoff features (like `List<int>.filled;`).
-   * Other constructor tearoff cases are not realized until resolution
-   * (like `List.filled;`).
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor tear-off is found
-  // in code that has an SDK constraint whose lower bound is less than 2.15.
-  // Constructor tear-offs weren't supported in earlier versions, so this code
-  // won't be able to run against earlier versions of the SDK.
-  //
-  // #### Example
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.15:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.9.0 <2.15.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // %language=2.14
-  // var setConstructor = [!Set.identity!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operator to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.15.0 <2.16.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not use constructor tear-offs:
-  //
-  // ```dart
-  // %language=2.14
-  // var setConstructor = () => Set.identity();
-  // ```
-  static const HintCode SDK_VERSION_CONSTRUCTOR_TEAROFFS = HintCode(
-      'SDK_VERSION_CONSTRUCTOR_TEAROFFS',
-      "Tearing off a constructor requires the 'constructor-tearoffs' "
-          "language feature.",
-      correction: "Try updating your pubspec.yaml to set the minimum SDK "
-          "constraint to 2.15 or higher, and running 'pub get'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the operator `==` is used on a
-  // non-primitive type inside a [constant context][] is found in code that has
-  // an SDK constraint whose lower bound is less than 2.3.2. Using this operator
-  // in a [constant context][] wasn't supported in earlier versions, so this
-  // code won't be able to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.2:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {}
-  // const C a = null;
-  // const C b = null;
-  // const bool same = a [!==!] b;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operator to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use the `==` operator, or change the code so that the
-  // expression isn't in a [constant context][]:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {}
-  // const C a = null;
-  // const C b = null;
-  // bool same = a == b;
-  // ```
-  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
-      "Using the operator '==' for non-primitive types wasn't supported "
-          "until version 2.3.2, but this code is required to be able to "
-          "run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an extension declaration or an
-  // extension override is found in code that has an SDK constraint whose lower
-  // bound is less than 2.6.0. Using extensions wasn't supported in earlier
-  // versions, so this code won't be able to run against earlier versions of the
-  // SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.6.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //  sdk: '>=2.4.0 <2.7.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // [!extension!] E on String {
-  //   void sayHello() {
-  //     print('Hello $this');
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the syntax to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.6.0 <2.7.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of extensions. The most common way to do this is to rewrite
-  // the members of the extension as top-level functions (or methods) that take
-  // the value that would have been bound to `this` as a parameter:
-  //
-  // ```dart
-  // void sayHello(String s) {
-  //   print('Hello $s');
-  // }
-  // ```
-  static const HintCode SDK_VERSION_EXTENSION_METHODS = HintCode(
-      'SDK_VERSION_EXTENSION_METHODS',
-      "Extension methods weren't supported until version 2.6.0, "
-          "but this code is required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the operator `>>>` is used in
-  // code that has an SDK constraint whose lower bound is less than 2.14.0. This
-  // operator wasn't supported in earlier versions, so this code won't be able
-  // to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.14.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //  sdk: '>=2.0.0 <2.15.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // int x = 3 [!>>>!] 4;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the operator to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.14.0 <2.15.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not use the `>>>` operator:
-  //
-  // ```dart
-  // int x = logicalShiftRight(3, 4);
-  //
-  // int logicalShiftRight(int leftOperand, int rightOperand) {
-  //   int divisor = 1 << rightOperand;
-  //   if (divisor == 0) {
-  //     return 0;
-  //   }
-  //   return leftOperand ~/ divisor;
-  // }
-  // ```
-  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = HintCode(
-      'SDK_VERSION_GT_GT_GT_OPERATOR',
-      "The operator '>>>' wasn't supported until version 2.14.0, but this code "
-          "is required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an `is` expression inside a
-  // [constant context][] is found in code that has an SDK constraint whose
-  // lower bound is less than 2.3.2. Using an `is` expression in a
-  // [constant context][] wasn't supported in earlier versions, so this code
-  // won't be able to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.2:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // const Object x = 4;
-  // const y = [!x is int!] ? 0 : 1;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the expression to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.2 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use the `is` operator, or, if that isn't possible, change the
-  // code so that the `is` expression isn't in a
-  // [constant context][]:
-  //
-  // ```dart
-  // const Object x = 4;
-  // var y = x is int ? 0 : 1;
-  // ```
-  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
-      "The use of an is expression in a constant context wasn't supported "
-          "until version 2.3.2, but this code is required to be able to run on "
-          "earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a reference to the class `Never`
-  // is found in code that has an SDK constraint whose lower bound is less than
-  // 2.12.0. This class wasn't defined in earlier versions, so this code won't
-  // be able to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.12.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.5.0 <2.6.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // [!Never!] n;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the type to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.12.0 <2.13.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not reference this class:
-  //
-  // ```dart
-  // dynamic x;
-  // ```
-  static const HintCode SDK_VERSION_NEVER = HintCode(
-      'SDK_VERSION_NEVER',
-      "The type 'Never' wasn't supported until version 2.12.0, but this code "
-          "is required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a set literal is found in code
-  // that has an SDK constraint whose lower bound is less than 2.2.0. Set
-  // literals weren't supported in earlier versions, so this code won't be able
-  // to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.2.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.1.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces this
-  // diagnostic:
-  //
-  // ```dart
-  // var s = [!<int>{}!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the syntax to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.2.0 <2.4.0'
-  // ```
-  //
-  // If you do need to support older versions of the SDK, then replace the set
-  // literal with code that creates the set without the use of a literal:
-  //
-  // ```dart
-  // var s = new Set<int>();
-  // ```
-  static const HintCode SDK_VERSION_SET_LITERAL = HintCode(
-      'SDK_VERSION_SET_LITERAL',
-      "Set literals weren't supported until version 2.2, but this code is "
-          "required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a for, if, or spread element is
-  // found in code that has an SDK constraint whose lower bound is less than
-  // 2.3.0. Using a for, if, or spread element wasn't supported in earlier
-  // versions, so this code won't be able to run against earlier versions of the
-  // SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.3.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.2.0 <2.4.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // var digits = [[!for (int i = 0; i < 10; i++) i!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the syntax to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.3.0 <2.4.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of those elements:
-  //
-  // ```dart
-  // var digits = _initializeDigits();
-  //
-  // List<int> _initializeDigits() {
-  //   var digits = <int>[];
-  //   for (int i = 0; i < 10; i++) {
-  //     digits.add(i);
-  //   }
-  //   return digits;
-  // }
-  // ```
-  static const HintCode SDK_VERSION_UI_AS_CODE = HintCode(
-      'SDK_VERSION_UI_AS_CODE',
-      "The for, if, and spread elements weren't supported until version 2.3.0, "
-          "but this code is required to be able to run on earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an if or spread element inside
-  // a [constant context][] is found in code that has an SDK constraint whose
-  // lower bound is less than 2.5.0. Using an if or spread element inside a
-  // [constant context][] wasn't supported in earlier versions, so this code
-  // won't be able to run against earlier versions of the SDK.
-  //
-  // #### Examples
-  //
-  // Here's an example of a pubspec that defines an SDK constraint with a lower
-  // bound of less than 2.5.0:
-  //
-  // ```yaml
-  // %uri="pubspec.yaml"
-  // environment:
-  //   sdk: '>=2.4.0 <2.6.0'
-  // ```
-  //
-  // In the package that has that pubspec, code like the following produces
-  // this diagnostic:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // const b = [[!...a!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need to support older versions of the SDK, then you can
-  // increase the SDK constraint to allow the syntax to be used:
-  //
-  // ```yaml
-  // environment:
-  //   sdk: '>=2.5.0 <2.6.0'
-  // ```
-  //
-  // If you need to support older versions of the SDK, then rewrite the code to
-  // not make use of those elements:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // const b = [1, 2];
-  // ```
-  //
-  // If that isn't possible, change the code so that the element isn't in a
-  // [constant context][]:
-  //
-  // ```dart
-  // const a = [1, 2];
-  // var b = [...a];
-  // ```
-  static const HintCode SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT = HintCode(
-      'SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT',
-      "The if and spread elements weren't supported in constant expressions "
-          "until version 2.5.0, but this code is required to be able to run on "
-          "earlier versions.",
-      correction: "Try updating the SDK constraints.",
-      hasPublishedDocs: true);
-
-  /**
-   * When "strict-raw-types" is enabled, "raw types" must have type arguments.
-   *
-   * A "raw type" is a type name that does not use inference to fill in missing
-   * type arguments; instead, each type argument is instantiated to its bound.
-   */
-  static const HintCode STRICT_RAW_TYPE = HintCode('STRICT_RAW_TYPE',
-      "The generic type '{0}' should have explicit type arguments but doesn't.",
-      correction: "Use explicit type arguments for '{0}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the sealed class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a sealed class (one that either
-  // has the `@sealed` annotation or inherits or mixes in a sealed class) is
-  // referenced in either the `extends`, `implements`, or `with` clause of a
-  // class or mixin declaration if the declaration isn't in the same package as
-  // the sealed class.
-  //
-  // #### Example
-  //
-  // Given a library in a package other than the package being analyzed that
-  // contains the following:
-  //
-  // ```dart
-  // %uri="package:a/a.dart"
-  // import 'package:meta/meta.dart';
-  //
-  // class A {}
-  //
-  // @sealed
-  // class B {}
-  // ```
-  //
-  // The following code produces this diagnostic because `C`, which isn't in the
-  // same package as `B`, is extending the sealed class `B`:
-  //
-  // ```dart
-  // import 'package:a/a.dart';
-  //
-  // [!class C extends B {}!]
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the class doesn't need to be a subtype of the sealed class, then change
-  // the declaration so that it isn't:
-  //
-  // ```dart
-  // import 'package:a/a.dart';
-  //
-  // class B extends A {}
-  // ```
-  //
-  // If the class needs to be a subtype of the sealed class, then either change
-  // the sealed class so that it's no longer sealed or move the subclass into
-  // the same package as the sealed class.
-  static const HintCode SUBTYPE_OF_SEALED_CLASS = HintCode(
-      'SUBTYPE_OF_SEALED_CLASS',
-      "The class '{0}' shouldn't be extended, mixed in, or implemented because "
-          "it's sealed.",
-      correction:
-          "Try composing instead of inheriting, or refer to the documentation "
-          "of '{0}' for more information.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's a type check (using the
-  // `as` operator) where the type is `Null`. There's only one value whose type
-  // is `Null`, so the code is both more readable and more performant when it
-  // tests for `null` explicitly.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the code is testing to
-  // see whether the value of `s` is `null` by using a type check:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if ([!s is Null!]) {
-  //     return;
-  //   }
-  //   print(s);
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the code is testing to
-  // see whether the value of `s` is something other than `null` by using a type
-  // check:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if ([!s is! Null!]) {
-  //     print(s);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the type check with the equivalent comparison with `null`:
-  //
-  // ```dart
-  // void f(String? s) {
-  //   if (s == null) {
-  //     return;
-  //   }
-  //   print(s);
-  // }
-  // ```
-  static const HintCode TYPE_CHECK_IS_NOT_NULL = HintCode(
-      'TYPE_CHECK_WITH_NULL',
-      "Tests for non-null should be done with '!= null'.",
-      correction: "Try replacing the 'is! Null' check with '!= null'.",
-      hasPublishedDocs: true,
-      uniqueName: 'TYPE_CHECK_IS_NOT_NULL');
-
-  /**
-   * No parameters.
-   */
-  static const HintCode TYPE_CHECK_IS_NULL = HintCode(
-      'TYPE_CHECK_WITH_NULL', "Tests for null should be done with '== null'.",
-      correction: "Try replacing the 'is Null' check with '== null'.",
-      hasPublishedDocs: true,
-      uniqueName: 'TYPE_CHECK_IS_NULL');
-
-  /**
-   * Parameters:
-   * 0: the name of the library being imported
-   * 1: the name in the hide clause that isn't defined in the library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a hide combinator includes a
-  // name that isn't defined by the library being imported.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `dart:math` doesn't
-  // define the name `String`:
-  //
-  // ```dart
-  // import 'dart:math' hide [!String!], max;
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different name should be hidden, then correct the name. Otherwise,
-  // remove the name from the list:
-  //
-  // ```dart
-  // import 'dart:math' hide max;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNDEFINED_HIDDEN_NAME = HintCode(
-      'UNDEFINED_HIDDEN_NAME',
-      "The library '{0}' doesn't export a member with the hidden name '{1}'.",
-      correction: "Try removing the name from the list of hidden members.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the undefined parameter
-   * 1: the name of the targeted member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an annotation of the form
-  // `@UnusedResult.unless(parameterDefined: parameterName)` specifies a
-  // parameter name that isn't defined by the annotated function.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the function `f`
-  // doesn't have a parameter named `b`:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @UseResult.unless(parameterDefined: [!'b'!])
-  // int f([int? a]) => a ?? 0;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the argument named `parameterDefined` to match the name of one of
-  // the parameters to the function:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // @UseResult.unless(parameterDefined: 'a')
-  // int f([int? a]) => a ?? 0;
-  // ```
-  static const HintCode UNDEFINED_REFERENCED_PARAMETER = HintCode(
-      'UNDEFINED_REFERENCED_PARAMETER',
-      "The parameter '{0}' is not defined by '{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the library being imported
-   * 1: the name in the show clause that isn't defined in the library
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a show combinator includes a
-  // name that isn't defined by the library being imported.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `dart:math` doesn't
-  // define the name `String`:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!String!];
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If a different name should be shown, then correct the name. Otherwise,
-  // remove the name from the list:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNDEFINED_SHOWN_NAME = HintCode('UNDEFINED_SHOWN_NAME',
-      "The library '{0}' doesn't export a member with the shown name '{1}'.",
-      correction: "Try removing the name from the list of shown members.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-diagnostic being ignored
-   */
-  static const HintCode UNIGNORABLE_IGNORE = HintCode(
-      'UNIGNORABLE_IGNORE', "The diagnostic '{0}' can't be ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value being cast is already
-  // known to be of the type that it's being cast to.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `n` is already known to
-  // be an `int` as a result of the `is` test:
-  //
-  // ```dart
-  // void f(num n) {
-  //   if (n is int) {
-  //     ([!n as int!]).isEven;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary cast:
-  //
-  // ```dart
-  // void f(num n) {
-  //   if (n is int) {
-  //     n.isEven;
-  //   }
-  // }
-  // ```
-  static const HintCode UNNECESSARY_CAST = HintCode(
-      'UNNECESSARY_CAST', "Unnecessary cast.",
-      correction: "Try removing the cast.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the diagnostic being ignored
-   */
-  static const HintCode UNNECESSARY_IGNORE = HintCode(
-      'UNNECESSARY_IGNORE',
-      "The diagnostic '{0}' isn't produced at this location so it doesn't "
-          "need to be ignored.",
-      correction:
-          "Try removing the name from the list, or removing the whole comment "
-          "if this is the only name in the list.");
-
-  /**
-   * Parameters:
-   * 0: the uri that is not necessary
-   * 1: the uri that makes it unnecessary
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import isn't needed because
-  // all of the names that are imported and referenced within the importing
-  // library are also visible through another import.
-  //
-  // #### Example
-  //
-  // Given a file named `a.dart` that contains the following:
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {}
-  // ```
-  //
-  // And, given a file named `b.dart` that contains the following:
-  //
-  // ```dart
-  // %uri="lib/b.dart"
-  // export 'a.dart';
-  //
-  // class B {}
-  // ```
-  //
-  // The following code produces this diagnostic because the class `A`, which is
-  // imported from `a.dart`, is also imported from `b.dart`. Removing the import
-  // of `a.dart` leaves the semantics unchanged:
-  //
-  // ```dart
-  // import [!'a.dart'!];
-  // import 'b.dart';
-  //
-  // void f(A a, B b) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the import isn't needed, then remove it.
-  //
-  // If some of the names imported by this import are intended to be used but
-  // aren't yet, and if those names aren't imported by other imports, then add
-  // the missing references to those names.
-  static const HintCode UNNECESSARY_IMPORT = HintCode(
-      'UNNECESSARY_IMPORT',
-      "The import of '{0}' is unnecessary because all of the used elements are "
-          "also provided by the import of '{1}'.",
-      correction: 'Try removing the import directive.');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when there's a declaration of
-  // `noSuchMethod`, the only thing the declaration does is invoke the
-  // overridden declaration, and the overridden declaration isn't the
-  // declaration in `Object`.
-  //
-  // Overriding the implementation of `Object`'s `noSuchMethod` (no matter what
-  // the implementation does) signals to the analyzer that it shouldn't flag any
-  // inherited abstract methods that aren't implemented in that class. This
-  // works even if the overriding implementation is inherited from a superclass,
-  // so there's no value to declare it again in a subclass.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the declaration of
-  // `noSuchMethod` in `A` makes the declaration of `noSuchMethod` in `B`
-  // unnecessary:
-  //
-  // ```dart
-  // class A {
-  //   @override
-  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
-  // }
-  // class B extends A {
-  //   @override
-  //   dynamic [!noSuchMethod!](y) {
-  //     return super.noSuchMethod(y);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unnecessary declaration:
-  //
-  // ```dart
-  // class A {
-  //   @override
-  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
-  // }
-  // class B extends A {}
-  // ```
-  static const HintCode UNNECESSARY_NO_SUCH_METHOD = HintCode(
-      'UNNECESSARY_NO_SUCH_METHOD', "Unnecessary 'noSuchMethod' declaration.",
-      correction: "Try removing the declaration of 'noSuchMethod'.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an equality comparison
-  // (either `==` or `!=`) with one operand of `null` and the other operand
-  // can't be `null`. Such comparisons are always either `true` or `false`, so
-  // they serve no purpose.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `x` can never be
-  // `null`, so the comparison always evaluates to `true`:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if (x [!!= null!]) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `x` can never be
-  // `null`, so the comparison always evaluates to `false`:
-  //
-  // ```dart
-  // void f(int x) {
-  //   if (x [!== null!]) {
-  //     throw ArgumentError("x can't be null");
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the other operand should be able to be `null`, then change the type of
-  // the operand:
-  //
-  // ```dart
-  // void f(int? x) {
-  //   if (x != null) {
-  //     print(x);
-  //   }
-  // }
-  // ```
-  //
-  // If the other operand really can't be `null`, then remove the condition:
-  //
-  // ```dart
-  // void f(int x) {
-  //   print(x);
-  // }
-  // ```
-  static const HintCode UNNECESSARY_NULL_COMPARISON_FALSE = HintCode(
-    'UNNECESSARY_NULL_COMPARISON',
-    "The operand can't be null, so the condition is always false.",
-    correction: "Try removing the condition, an enclosing condition, "
-        "or the whole conditional statement.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_NULL_COMPARISON_FALSE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode UNNECESSARY_NULL_COMPARISON_TRUE = HintCode(
-    'UNNECESSARY_NULL_COMPARISON',
-    "The operand can't be null, so the condition is always true.",
-    correction: "Remove the condition.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_NULL_COMPARISON_TRUE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when either the type `dynamic` or the
-  // type `Null` is followed by a question mark. Both of these types are
-  // inherently nullable so the question mark doesn't change the semantics.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the question mark
-  // following `dynamic` isn't necessary:
-  //
-  // ```dart
-  // dynamic[!?!] x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unneeded question mark:
-  //
-  // ```dart
-  // dynamic x;
-  // ```
-  static const HintCode UNNECESSARY_QUESTION_MARK = HintCode(
-      'UNNECESSARY_QUESTION_MARK',
-      "The '?' is unnecessary because '{0}' is nullable without it.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the value of a type check (using
-  // either `is` or `is!`) is known at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the test `a is Object?`
-  // is always `true`:
-  //
-  // ```dart
-  // bool f<T>(T a) => [!a is Object?!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type check doesn't check what you intended to check, then change the
-  // test:
-  //
-  // ```dart
-  // bool f<T>(T a) => a is Object;
-  // ```
-  //
-  // If the type check does check what you intended to check, then replace the
-  // type check with its known value or completely remove it:
-  //
-  // ```dart
-  // bool f<T>(T a) => true;
-  // ```
-  static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = HintCode(
-    'UNNECESSARY_TYPE_CHECK',
-    "Unnecessary type check; the result is always 'false'.",
-    correction: "Try correcting the type check, or removing the type check.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_TYPE_CHECK_FALSE',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = HintCode(
-    'UNNECESSARY_TYPE_CHECK',
-    "Unnecessary type check; the result is always 'true'.",
-    correction: "Try correcting the type check, or removing the type check.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNNECESSARY_TYPE_CHECK_TRUE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the exception variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `catch` clause is found, and
-  // neither the exception parameter nor the optional stack trace parameter are
-  // used in the `catch` block.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `e` isn't referenced:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     int.parse(';');
-  //   } on FormatException catch ([!e!]) {
-  //     // ignored
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the unused `catch` clause:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     int.parse(';');
-  //   } on FormatException {
-  //     // ignored
-  //   }
-  // }
-  // ```
-  static const HintCode UNUSED_CATCH_CLAUSE = HintCode(
-      'UNUSED_CATCH_CLAUSE',
-      "The exception variable '{0}' isn't used, so the 'catch' clause can be "
-          "removed.",
-      // TODO(brianwilkerson) Split this error code so that we can differentiate
-      // between removing the catch clause and replacing the catch clause with
-      // an on clause.
-      correction: "Try removing the catch clause.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the stack trace variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the stack trace parameter in a
-  // `catch` clause isn't referenced within the body of the `catch` block.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `stackTrace` isn't
-  // referenced:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } catch (exception, [!stackTrace!]) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the stack trace parameter, then add a reference to
-  // it. Otherwise, remove it:
-  //
-  // ```dart
-  // void f() {
-  //   try {
-  //     // ...
-  //   } catch (exception) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  static const HintCode UNUSED_CATCH_STACK = HintCode('UNUSED_CATCH_STACK',
-      "The stack trace variable '{0}' isn't used and can be removed.",
-      correction: "Try removing the stack trace variable, or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name that is declared but not referenced
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a private declaration isn't
-  // referenced in the library that contains the declaration. The following
-  // kinds of declarations are analyzed:
-  // - Private top-level declarations, such as classes, enums, mixins, typedefs,
-  //   top-level variables, and top-level functions
-  // - Private static and instance methods
-  // - Optional parameters of private functions for which a value is never
-  //   passed, even when the parameter doesn't have a private name
-  //
-  // #### Examples
-  //
-  // Assuming that no code in the library references `_C`, the following code
-  // produces this diagnostic:
-  //
-  // ```dart
-  // class [!_C!] {}
-  // ```
-  //
-  // Assuming that no code in the library passes a value for `y` in any
-  // invocation of `_m`, the following code produces this diagnostic:
-  //
-  // ```dart
-  // %language=2.9
-  // class C {
-  //   void _m(int x, [int [!y!]]) {}
-  //
-  //   void n() => _m(0);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the declaration isn't needed, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   void _m(int x) {}
-  //
-  //   void n() => _m(0);
-  // }
-  // ```
-  //
-  // If the declaration is intended to be used, then add the code to use it.
-  static const HintCode UNUSED_ELEMENT = HintCode(
-      'UNUSED_ELEMENT', "The declaration '{0}' isn't referenced.",
-      correction: "Try removing the declaration of '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the parameter that is declared but not used
-   */
-  static const HintCode UNUSED_ELEMENT_PARAMETER = HintCode(
-    'UNUSED_ELEMENT',
-    "A value for optional parameter '{0}' isn't ever given.",
-    correction: "Try removing the unused parameter.",
-    hasPublishedDocs: true,
-    uniqueName: 'UNUSED_ELEMENT_PARAMETER',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the unused field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a private field is declared but
-  // never read, even if it's written in one or more places.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field
-  // `_originalValue` isn't read anywhere in the library:
-  //
-  // ```dart
-  // class C {
-  //   final String [!_originalValue!];
-  //   final String _currentValue;
-  //
-  //   C(this._originalValue) : _currentValue = _originalValue;
-  //
-  //   String get value => _currentValue;
-  // }
-  // ```
-  //
-  // It might appear that the field `_originalValue` is being read in the
-  // initializer (`_currentValue = _originalValue`), but that is actually a
-  // reference to the parameter of the same name, not a reference to the field.
-  //
-  // #### Common fixes
-  //
-  // If the field isn't needed, then remove it.
-  //
-  // If the field was intended to be used, then add the missing code.
-  static const HintCode UNUSED_FIELD = HintCode(
-      'UNUSED_FIELD', "The value of the field '{0}' isn't used.",
-      correction: "Try removing the field, or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the content of the unused import's uri
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an import isn't needed because
-  // none of the names that are imported are referenced within the importing
-  // library.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because nothing defined in
-  // `dart:async` is referenced in the library:
-  //
-  // ```dart
-  // import [!'dart:async'!];
-  //
-  // void main() {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the import isn't needed, then remove it.
-  //
-  // If some of the imported names are intended to be used, then add the missing
-  // code.
-  static const HintCode UNUSED_IMPORT = HintCode(
-      'UNUSED_IMPORT', "Unused import: '{0}'.",
-      correction: "Try removing the import directive.", hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the label that isn't used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a label that isn't used is
-  // found.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the label `loop` isn't
-  // referenced anywhere in the method:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   [!loop:!] for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the label isn't needed, then remove it:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //   }
-  // }
-  // ```
-  //
-  // If the label is needed, then use it:
-  //
-  // ```dart
-  // void f(int limit) {
-  //   loop: for (int i = 0; i < limit; i++) {
-  //     print(i);
-  //     break loop;
-  //   }
-  // }
-  // ```
-  // TODO(brianwilkerson) Highlight the identifier without the colon.
-  static const HintCode UNUSED_LABEL =
-      HintCode('UNUSED_LABEL', "The label '{0}' isn't used.",
-          correction: "Try removing the label, or "
-              "using it in either a 'break' or 'continue' statement.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the unused variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable is declared but
-  // never read, even if it's written in one or more places.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `count` is
-  // never read:
-  //
-  // ```dart
-  // void main() {
-  //   int [!count!] = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the variable isn't needed, then remove it.
-  //
-  // If the variable was intended to be used, then add the missing code.
-  static const HintCode UNUSED_LOCAL_VARIABLE = HintCode(
-      'UNUSED_LOCAL_VARIABLE',
-      "The value of the local variable '{0}' isn't used.",
-      correction: "Try removing the variable or using it.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the annotated method, property or function
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function annotated with
-  // `useResult` is invoked, and the value returned by that function isn't used.
-  // The value is considered to be used if a member of the value is invoked, if
-  // the value is passed to another function, or if the value is assigned to a
-  // variable or field.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the invocation of
-  // `c.a()` isn't used, even though the method `a` is annotated with
-  // `useResult`:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @useResult
-  //   int a() => 0;
-  //
-  //   int b() => 0;
-  // }
-  //
-  // void f(C c) {
-  //   c.[!a!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you intended to invoke the annotated function, then use the value that
-  // was returned:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @useResult
-  //   int a() => 0;
-  //
-  //   int b() => 0;
-  // }
-  //
-  // void f(C c) {
-  //   print(c.a());
-  // }
-  // ```
-  //
-  // If you intended to invoke a different function, then correct the name of
-  // the function being invoked:
-  //
-  // ```dart
-  // import 'package:meta/meta.dart';
-  //
-  // class C {
-  //   @useResult
-  //   int a() => 0;
-  //
-  //   int b() => 0;
-  // }
-  //
-  // void f(C c) {
-  //   c.b();
-  // }
-  // ```
-  static const HintCode UNUSED_RESULT = HintCode(
-    'UNUSED_RESULT',
-    "The value of '{0}' should be used.",
-    correction: "Try using the result by invoking a member, passing it to a "
-        "function, or returning it from this function.",
-    hasPublishedDocs: false,
-  );
-
-  /**
-   * The result of invoking a method, property, or function annotated with
-   * `@useResult` must be used (assigned, passed to a function as an argument,
-   * or returned by a function).
-   *
-   * Parameters:
-   * 0: the name of the annotated method, property or function
-   * 1: message details
-   */
-  static const HintCode UNUSED_RESULT_WITH_MESSAGE = HintCode(
-    'UNUSED_RESULT',
-    "'{0}' should be used. {1}.",
-    // todo(pq): consider passing in correction details:
-    // https://github.com/dart-lang/sdk/issues/46066
-    correction:
-        "Try using the result by invoking a member, passing it to a function, "
-        "or returning it from this function.",
-    hasPublishedDocs: false,
-    uniqueName: 'UNUSED_RESULT_WITH_MESSAGE',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name that is shown but not used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a show combinator includes a
-  // name that isn't used within the library. Because it isn't referenced, the
-  // name can be removed.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the function `max`
-  // isn't used:
-  //
-  // ```dart
-  // import 'dart:math' show min, [!max!];
-  //
-  // var x = min(0, 1);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either use the name or remove it:
-  //
-  // ```dart
-  // import 'dart:math' show min;
-  //
-  // var x = min(0, 1);
-  // ```
-  static const HintCode UNUSED_SHOWN_NAME = HintCode(
-      'UNUSED_SHOWN_NAME', "The name {0} is shown, but isn’t used.",
-      correction: "Try removing the name from the list of shown members.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a library is imported using the
-  // `dart-ext` scheme.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the native library `x`
-  // is being imported using a scheme of `dart-ext`:
-  //
-  // ```dart
-  // [!import 'dart-ext:x';!]
-  // int f() native 'string';
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rewrite the code to use `dart:ffi` as a way of invoking the contents of the
-  // native library.
-  static const HintCode USE_OF_NATIVE_EXTENSION = HintCode(
-      'USE_OF_NATIVE_EXTENSION',
-      "Dart native extensions are deprecated and aren’t available in Dart 2.15.",
-      correction: "Try using dart:ffi for C interop.");
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const HintCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: 'HintCode.${uniqueName ?? name}',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
-
-  @override
-  ErrorType get type => ErrorType.HINT;
-}
+export 'package:analyzer/src/dart/error/hint_codes.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
new file mode 100644
index 0000000..f1f850a
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
@@ -0,0 +1,3916 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+import "package:analyzer/src/error/analyzer_error_code.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class HintCode extends AnalyzerErrorCode {
+  /**
+   * Parameters:
+   * 0: the name of the actual argument type
+   * 1: the name of the expected function return type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation of
+  // `Future.catchError` has an argument that is a function whose parameters
+  // aren't compatible with the arguments that will be passed to the function
+  // when it's invoked. The static type of the first argument to `catchError`
+  // is just `Function`, even though the function that is passed in is expected
+  // to have either a single parameter of type `Object` or two parameters of
+  // type `Object` and `StackTrace`.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` doesn't take any parameters, but the function is
+  // required to take at least one parameter:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!() => 0!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` takes three parameters, but it can't have more than
+  // two required parameters:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!(one, two, three) => 0!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because even though the closure
+  // being passed to `catchError` takes one parameter, the closure doesn't have
+  // a type that is compatible with `Object`:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError([!(String error) => 0!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the function being passed to `catchError` so that it has either one
+  // or two required parameters, and the parameters have the required types:
+  //
+  // ```dart
+  // void f(Future<int> f) {
+  //   f.catchError((Object error) => 0);
+  // }
+  // ```
+  static const HintCode ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER =
+      HintCode(
+    'ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER',
+    "The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Users should not assign values marked `@doNotStore`.
+   */
+  static const HintCode ASSIGNMENT_OF_DO_NOT_STORE = HintCode(
+    'ASSIGNMENT_OF_DO_NOT_STORE',
+    "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable.",
+    correction: "Try removing the assignment.",
+  );
+
+  /**
+   * When the target expression uses '?.' operator, it can be `null`, so all the
+   * subsequent invocations should also use '?.' operator.
+   */
+  static const HintCode CAN_BE_NULL_AFTER_NULL_AWARE = HintCode(
+    'CAN_BE_NULL_AFTER_NULL_AWARE',
+    "The receiver uses '?.', so its value can be null.",
+    correction: "Replace the '.' with a '?.' in the invocation.",
+  );
+
+  /**
+   * Dead code is code that is never reached, this can happen for instance if a
+   * statement follows a return statement.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when code is found that won't be
+  // executed because execution will never reach the code.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the invocation of
+  // `print` occurs after the function has returned:
+  //
+  // ```dart
+  // void f() {
+  //   return;
+  //   [!print('here');!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the code isn't needed, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   return;
+  // }
+  // ```
+  //
+  // If the code needs to be executed, then either move the code to a place
+  // where it will be executed:
+  //
+  // ```dart
+  // void f() {
+  //   print('here');
+  //   return;
+  // }
+  // ```
+  //
+  // Or, rewrite the code before it, so that it can be reached:
+  //
+  // ```dart
+  // void f({bool skipPrinting = true}) {
+  //   if (skipPrinting) {
+  //     return;
+  //   }
+  //   print('here');
+  // }
+  // ```
+  static const HintCode DEAD_CODE = HintCode(
+    'DEAD_CODE',
+    "Dead code.",
+    correction:
+        "Try removing the code, or fixing the code before it so that it can be reached.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Dead code is code that is never reached. This case covers cases where the
+   * user has catch clauses after `catch (e)` or `on Object catch (e)`.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it’s after a `catch` clause of the form
+  // `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
+  // the thrown object is selected, and both of those forms will match any
+  // object, so no `catch` clauses that follow them will be selected.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } catch (e) {
+  //   } [!on String {
+  //   }!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the clause should be selectable, then move the clause before the general
+  // clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on String {
+  //   } catch (e) {
+  //   }
+  // }
+  // ```
+  //
+  // If the clause doesn't need to be selectable, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } catch (e) {
+  //   }
+  // }
+  // ```
+  static const HintCode DEAD_CODE_CATCH_FOLLOWING_CATCH = HintCode(
+    'DEAD_CODE_CATCH_FOLLOWING_CATCH',
+    "Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reached.",
+    correction:
+        "Try reordering the catch clauses so that they can be reached, or removing the unreachable catch clauses.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Dead code is code that is never reached. This case covers cases where the
+   * user has an on-catch clause such as `on A catch (e)`, where a supertype of
+   * `A` was already caught.
+   *
+   * Parameters:
+   * 0: name of the subtype
+   * 1: name of the supertype
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it is after a `catch` clause that catches either
+  // the same type or a supertype of the clause's type. The first `catch` clause
+  // that matches the thrown object is selected, and the earlier clause always
+  // matches anything matchable by the highlighted clause, so the highlighted
+  // clause will never be selected.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on num {
+  //   } [!on int {
+  //   }!]
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the clause should be selectable, then move the clause before the general
+  // clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on int {
+  //   } on num {
+  //   }
+  // }
+  // ```
+  //
+  // If the clause doesn't need to be selectable, then remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //   } on num {
+  //   }
+  // }
+  // ```
+  static const HintCode DEAD_CODE_ON_CATCH_SUBTYPE = HintCode(
+    'DEAD_CODE_ON_CATCH_SUBTYPE',
+    "Dead code: This on-catch block won’t be executed because '{0}' is a subtype of '{1}' and hence will have been caught already.",
+    correction:
+        "Try reordering the catch clauses so that this block can be reached, or removing the unreachable catch clause.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the class `Function` is used in
+  // either the `extends`, `implements`, or `with` clause of a class or mixin.
+  // Using the class `Function` in this way has no semantic value, so it's
+  // effectively dead code.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `Function` is used as
+  // the superclass of `F`:
+  //
+  // ```dart
+  // class F extends [!Function!] {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the class `Function` from whichever clause it's in, and remove the
+  // whole clause if `Function` is the only type in the clause:
+  //
+  // ```dart
+  // class F {}
+  // ```
+  static const HintCode DEPRECATED_EXTENDS_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Extending 'Function' is deprecated.",
+    correction: "Try removing 'Function' from the 'extends' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_EXTENDS_FUNCTION',
+  );
+
+  /**
+   * Users should not create a class named `Function` anymore.
+   */
+  static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = HintCode(
+    'DEPRECATED_FUNCTION_CLASS_DECLARATION',
+    "Declaring a class named 'Function' is deprecated.",
+    correction: "Try renaming the class.",
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode DEPRECATED_IMPLEMENTS_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Implementing 'Function' has no effect.",
+    correction: "Try removing 'Function' from the 'implements' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_IMPLEMENTS_FUNCTION',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a deprecated library or class
+  // member is used in a different package.
+  //
+  // #### Examples
+  //
+  // If the method `m` in the class `C` is annotated with `@deprecated`, then
+  // the following code produces this diagnostic:
+  //
+  // ```dart
+  // void f(C c) {
+  //   c.[!m!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The documentation for declarations that are annotated with `@deprecated`
+  // should indicate what code to use in place of the deprecated code.
+  static const HintCode DEPRECATED_MEMBER_USE = HintCode(
+    'DEPRECATED_MEMBER_USE',
+    "'{0}' is deprecated and shouldn't be used.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a deprecated library member or
+  // class member is used in the same package in which it's declared.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `x` is deprecated:
+  //
+  // ```dart
+  // @deprecated
+  // var x = 0;
+  // var y = [!x!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // The fix depends on what's been deprecated and what the replacement is. The
+  // documentation for deprecated declarations should indicate what code to use
+  // in place of the deprecated code.
+  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE = HintCode(
+    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
+    "'{0}' is deprecated and shouldn't be used.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   * 1: message details
+   */
+  static const HintCode DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE =
+      HintCode(
+    'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE',
+    "'{0}' is deprecated and shouldn't be used. {1}.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   * 1: message details
+   */
+  static const HintCode DEPRECATED_MEMBER_USE_WITH_MESSAGE = HintCode(
+    'DEPRECATED_MEMBER_USE',
+    "'{0}' is deprecated and shouldn't be used. {1}.",
+    correction:
+        "Try replacing the use of the deprecated member with the replacement.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MEMBER_USE_WITH_MESSAGE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode DEPRECATED_MIXIN_FUNCTION = HintCode(
+    'DEPRECATED_SUBTYPE_OF_FUNCTION',
+    "Mixing in 'Function' is deprecated.",
+    correction: "Try removing 'Function' from the 'with' clause.",
+    hasPublishedDocs: true,
+    uniqueName: 'DEPRECATED_MIXIN_FUNCTION',
+  );
+
+  /**
+   * Hint to use the ~/ operator.
+   */
+  static const HintCode DIVISION_OPTIMIZATION = HintCode(
+    'DIVISION_OPTIMIZATION',
+    "The operator x ~/ y is more efficient than (x / y).toInt().",
+    correction: "Try re-writing the expression to use the '~/' operator.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name occurs multiple times in
+  // a `hide` clause. Repeating the name is unnecessary.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `min` is
+  // hidden more than once:
+  //
+  // ```dart
+  // import 'dart:math' hide min, [!min!];
+  //
+  // var x = pi;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name was mistyped in one or more places, then correct the mistyped
+  // names:
+  //
+  // ```dart
+  // import 'dart:math' hide max, min;
+  //
+  // var x = pi;
+  // ```
+  //
+  // If the name wasn't mistyped, then remove the unnecessary name from the
+  // list:
+  //
+  // ```dart
+  // import 'dart:math' hide min;
+  //
+  // var x = pi;
+  // ```
+  static const HintCode DUPLICATE_HIDDEN_NAME = HintCode(
+    'DUPLICATE_HIDDEN_NAME',
+    "Duplicate hidden name.",
+    correction:
+        "Try removing the repeated name from the list of hidden members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the diagnostic being ignored
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a diagnostic name appears in an
+  // `ignore` comment, but the diagnostic is already being ignored, either
+  // because it's already included in the same `ignore` comment or because it
+  // appears in an `ignore-in-file` comment.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the diagnostic named
+  // `unused_local_variable` is already being ignored for the whole file so it
+  // doesn't need to be ignored on a specific line:
+  //
+  // ```dart
+  // // ignore_for_file: unused_local_variable
+  // void f() {
+  //   // ignore: [!unused_local_variable!]
+  //   var x = 0;
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the diagnostic named
+  // `unused_local_variable` is being ignored twice on the same line:
+  //
+  // ```dart
+  // void f() {
+  //   // ignore: unused_local_variable, [!unused_local_variable!]
+  //   var x = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the ignore comment, or remove the unnecessary diagnostic name if the
+  // ignore comment is ignoring more than one diagnostic:
+  //
+  // ```dart
+  // // ignore_for_file: unused_local_variable
+  // void f() {
+  //   var x = 0;
+  // }
+  // ```
+  static const HintCode DUPLICATE_IGNORE = HintCode(
+    'DUPLICATE_IGNORE',
+    "The diagnostic '{0}' doesn't need to be ignored here because it's already being ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Duplicate imports.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import directive is found
+  // that is the same as an import before it in the file. The second import
+  // doesn’t add value and should be removed.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  // import [!'package:meta/meta.dart'!];
+  //
+  // @sealed class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary import:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @sealed class C {}
+  // ```
+  static const HintCode DUPLICATE_IMPORT = HintCode(
+    'DUPLICATE_IMPORT',
+    "Duplicate import.",
+    correction: "Try removing all but one import of the library.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a name occurs multiple times in
+  // a `show` clause. Repeating the name is unnecessary.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the name `min` is shown
+  // more than once:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!min!];
+  //
+  // var x = min(2, min(0, 1));
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the name was mistyped in one or more places, then correct the mistyped
+  // names:
+  //
+  // ```dart
+  // import 'dart:math' show max, min;
+  //
+  // var x = max(2, min(0, 1));
+  // ```
+  //
+  // If the name wasn't mistyped, then remove the unnecessary name from the
+  // list:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(2, min(0, 1));
+  // ```
+  static const HintCode DUPLICATE_SHOWN_NAME = HintCode(
+    'DUPLICATE_SHOWN_NAME',
+    "Duplicate shown name.",
+    correction:
+        "Try removing the repeated name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an element in a non-constant set
+  // is the same as a previous element in the same set. If two elements are the
+  // same, then the second value is ignored, which makes having both elements
+  // pointless and likely signals a bug.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the element `1` appears
+  // twice:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 1;
+  // var s = <int>{a, [!b!]};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If both elements should be included in the set, then change one of the
+  // elements:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 2;
+  // var s = <int>{a, b};
+  // ```
+  //
+  // If only one of the elements is needed, then remove the one that isn't
+  // needed:
+  //
+  // ```dart
+  // const a = 1;
+  // var s = <int>{a};
+  // ```
+  //
+  // Note that literal sets preserve the order of their elements, so the choice
+  // of which element to remove might affect the order in which elements are
+  // returned by an iterator.
+  static const HintCode EQUAL_ELEMENTS_IN_SET = HintCode(
+    'EQUAL_ELEMENTS_IN_SET',
+    "Two elements in a set literal shouldn't be equal.",
+    correction: "Change or remove the duplicate element.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a key in a non-constant map is
+  // the same as a previous key in the same map. If two keys are the same, then
+  // the second value overwrites the first value, which makes having both pairs
+  // pointless and likely signals a bug.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the keys `a` and `b`
+  // have the same value:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 1;
+  // var m = <int, String>{a: 'a', [!b!]: 'b'};
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If both entries should be included in the map, then change one of the keys:
+  //
+  // ```dart
+  // const a = 1;
+  // const b = 2;
+  // var m = <int, String>{a: 'a', b: 'b'};
+  // ```
+  //
+  // If only one of the entries is needed, then remove the one that isn't
+  // needed:
+  //
+  // ```dart
+  // const a = 1;
+  // var m = <int, String>{a: 'a'};
+  // ```
+  //
+  // Note that literal maps preserve the order of their entries, so the choice
+  // of which entry to remove might affect the order in which the keys and
+  // values are returned by an iterator.
+  static const HintCode EQUAL_KEYS_IN_MAP = HintCode(
+    'EQUAL_KEYS_IN_MAP',
+    "Two keys in a map literal shouldn't be equal.",
+    correction: "Change or remove the duplicate key.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * It is a bad practice for a source file in a package "lib" directory
+   * hierarchy to traverse outside that directory hierarchy. For example, a
+   * source file in the "lib" directory should not contain a directive such as
+   * `import '../web/some.dart'` which references a file outside the lib
+   * directory.
+   */
+  static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE =
+      HintCode(
+    'FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE',
+    "A file in the 'lib' directory shouldn't import a file outside the 'lib' directory.",
+    correction:
+        "Try removing the import, or moving the imported file inside the 'lib' directory.",
+  );
+
+  /**
+   * It is a bad practice for a source file ouside a package "lib" directory
+   * hierarchy to traverse into that directory hierarchy. For example, a source
+   * file in the "web" directory should not contain a directive such as
+   * `import '../lib/some.dart'` which references a file inside the lib
+   * directory.
+   */
+  static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE =
+      HintCode(
+    'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE',
+    "A file outside the 'lib' directory shouldn't reference a file inside the 'lib' directory using a relative path.",
+    correction: "Try using a package: URI instead.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library that declares a
+  // function named `loadLibrary` is imported using a deferred import. A
+  // deferred import introduces an implicit function named `loadLibrary`. This
+  // function is used to load the contents of the deferred library, and the
+  // implicit function hides the explicit declaration in the deferred library.
+  //
+  // For more information, see the language tour's coverage of
+  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
+  //
+  // #### Example
+  //
+  // Given a file (`a.dart`) that defines a function named `loadLibrary`:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // void loadLibrary(Library library) {}
+  //
+  // class Library {}
+  // ```
+  //
+  // The following code produces this diagnostic because the implicit
+  // declaration of `a.loadLibrary` is hiding the explicit declaration of
+  // `loadLibrary` in `a.dart`:
+  //
+  // ```dart
+  // [!import 'a.dart' deferred as a;!]
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the imported library isn't required to be deferred, then remove the
+  // keyword `deferred`:
+  //
+  // ```dart
+  // import 'a.dart' as a;
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // If the imported library is required to be deferred and you need to
+  // reference the imported function, then rename the function in the imported
+  // library:
+  //
+  // ```dart
+  // void populateLibrary(Library library) {}
+  //
+  // class Library {}
+  // ```
+  //
+  // If the imported library is required to be deferred and you don't need to
+  // reference the imported function, then add a `hide` clause:
+  //
+  // ```dart
+  // import 'a.dart' deferred as a hide loadLibrary;
+  //
+  // void f() {
+  //   a.Library();
+  // }
+  // ```
+  //
+  // If type arguments shouldn't be required for the class, then mark the class
+  // with the `@optionalTypeArgs` annotation (from `package:meta`):
+  static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = HintCode(
+    'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION',
+    "The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this library.",
+    correction:
+        "Try changing the import to not be deferred, or rename the function in the imported library.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * https://github.com/dart-lang/sdk/issues/44063
+   */
+  static const HintCode IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE = HintCode(
+    'IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE',
+    "The library '{0}' is legacy, and should not be imported into a null safe library.",
+    correction: "Try migrating the imported library.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, collection literal types must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_COLLECTION_LITERAL = HintCode(
+    'INFERENCE_FAILURE_ON_COLLECTION_LITERAL',
+    "The type argument(s) of '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in function invocations must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_INVOCATION = HintCode(
+    'INFERENCE_FAILURE_ON_FUNCTION_INVOCATION',
+    "The type argument(s) of the function '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, recursive local functions, top-level
+   * functions, methods, and function-typed function parameters must all
+   * specify a return type. See the strict-inference resource:
+   *
+   * https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md
+   */
+  static const HintCode INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE = HintCode(
+    'INFERENCE_FAILURE_ON_FUNCTION_RETURN_TYPE',
+    "The return type of '{0}' cannot be inferred.",
+    correction: "Declare the return type of '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in function invocations must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_GENERIC_INVOCATION = HintCode(
+    'INFERENCE_FAILURE_ON_GENERIC_INVOCATION',
+    "The type argument(s) of the generic function type '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" is enabled, types in instance creation
+   * (constructor calls) must be inferred via the context type, or have type
+   * arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
+    'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
+    "The type argument(s) of the constructor '{0}' can't be inferred.",
+    correction: "Use explicit type argument(s) for '{0}'.",
+  );
+
+  /**
+   * When "strict-inference" in enabled, uninitialized variables must be
+   * declared with a specific type.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE = HintCode(
+    'INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE',
+    "The type of {0} can't be inferred without either a type or initializer.",
+    correction: "Try specifying the type of the variable.",
+  );
+
+  /**
+   * When "strict-inference" in enabled, function parameters must be
+   * declared with a specific type, or inherit a type.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_UNTYPED_PARAMETER = HintCode(
+    'INFERENCE_FAILURE_ON_UNTYPED_PARAMETER',
+    "The type of {0} can't be inferred; a type must be explicitly provided.",
+    correction: "Try specifying the type of the parameter.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the annotation
+   * 1: the list of valid targets
+   */
+  static const HintCode INVALID_ANNOTATION_TARGET = HintCode(
+    'INVALID_ANNOTATION_TARGET',
+    "The annotation '{0}' can only be used on {1}",
+  );
+
+  /**
+   * This hint is generated anywhere where an element annotated with `@internal`
+   * is exported as a part of a package's public API.
+   *
+   * Parameters:
+   * 0: the name of the element
+   */
+  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT = HintCode(
+    'INVALID_EXPORT_OF_INTERNAL_ELEMENT',
+    "The member '{0}' can't be exported as a part of a package's public API.",
+    correction: "Try using a hide clause to hide '{0}'.",
+  );
+
+  /**
+   * This hint is generated anywhere where an element annotated with `@internal`
+   * is exported indirectly as a part of a package's public API.
+   *
+   * Parameters:
+   * 0: the name of the element
+   */
+  static const HintCode INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY =
+      HintCode(
+    'INVALID_EXPORT_OF_INTERNAL_ELEMENT_INDIRECTLY',
+    "The member '{0}' can't be exported as a part of a package's public API, but is indirectly exported as part of the signature of '{1}'.",
+    correction: "Try using a hide clause to hide '{0}'.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * anything other than a method.
+   */
+  static const HintCode INVALID_FACTORY_ANNOTATION = HintCode(
+    'INVALID_FACTORY_ANNOTATION',
+    "Only methods can be annotated as factories.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * a method that does not declare a return type.
+   */
+  static const HintCode INVALID_FACTORY_METHOD_DECL = HintCode(
+    'INVALID_FACTORY_METHOD_DECL',
+    "Factory method '{0}' must have a return type.",
+  );
+
+  /**
+   * This hint is generated anywhere a @factory annotation is associated with
+   * a non-abstract method that can return anything other than a newly allocated
+   * object.
+   *
+   * Parameters:
+   * 0: the name of the method
+   */
+  static const HintCode INVALID_FACTORY_METHOD_IMPL = HintCode(
+    'INVALID_FACTORY_METHOD_IMPL',
+    "Factory method '{0}' doesn't return a newly allocated object.",
+  );
+
+  /**
+   * This hint is generated anywhere an @immutable annotation is associated with
+   * anything other than a class.
+   */
+  static const HintCode INVALID_IMMUTABLE_ANNOTATION = HintCode(
+    'INVALID_IMMUTABLE_ANNOTATION',
+    "Only classes can be annotated as being immutable.",
+  );
+
+  /**
+   * This hint is generated anywhere a @internal annotation is associated with
+   * an element found in a package's public API.
+   */
+  static const HintCode INVALID_INTERNAL_ANNOTATION = HintCode(
+    'INVALID_INTERNAL_ANNOTATION',
+    "Only public elements in a package's private API can be annotated as being internal.",
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override number must begin with '@dart'",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override comment must be specified with an '=' character",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
+  );
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The language version override can't specify a version greater than the latest known language version: {0}.{1}",
+    correction: "Try removing the language version override.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
+  );
+
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The language version override must be before any declaration or directive.",
+    correction:
+        "Try moving the language version override to the top of the file.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override comment must be specified with the word 'dart' in all lower case",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override comment must be specified with a version number, like '2.0', after the '=' character.",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX = HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override number can't be prefixed with a letter",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS =
+      HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override comment can't be followed by any non-whitespace characters",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
+  );
+
+  /**
+   * Invalid Dart language version comments don't follow the specification [1].
+   * If a comment begins with "@dart" or "dart" (letters in any case),
+   * followed by optional whitespace, followed by optional non-alphanumeric,
+   * non-whitespace characters, followed by optional whitespace, followed by
+   * an optional alphabetical character, followed by a digit, then the
+   * comment is considered to be an attempt at a language version override
+   * comment. If this attempted language version override comment is not a
+   * valid language version override comment, it is reported.
+   *
+   * [1] https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/feature-specification.md#individual-library-language-version-override
+   */
+  static const HintCode INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES =
+      HintCode(
+    'INVALID_LANGUAGE_VERSION_OVERRIDE',
+    "The Dart language version override comment must be specified with exactly two slashes.",
+    correction:
+        "Specify a Dart language version override with a comment like '// @dart = 2.0'.",
+    uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the `@literal` annotation is
+  // applied to anything other than a const constructor.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the constructor isn't
+  // a `const` constructor:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   [!@literal!]
+  //   C();
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `x` isn't a
+  // constructor:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@literal!]
+  // var x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the annotation is on a constructor and the constructor should always be
+  // invoked with `const`, when possible, then mark the constructor with the
+  // `const` keyword:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  // ```
+  //
+  // If the constructor can't be marked as `const`, then remove the annotation.
+  //
+  // If the annotation is on anything other than a constructor, then remove the
+  // annotation:
+  //
+  // ```dart
+  // var x;
+  // ```
+  static const HintCode INVALID_LITERAL_ANNOTATION = HintCode(
+    'INVALID_LITERAL_ANNOTATION',
+    "Only const constructors can have the `@literal` annotation.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * This hint is generated anywhere where `@nonVirtual` annotates something
+   * other than a non-abstract instance member in a class or mixin.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_NON_VIRTUAL_ANNOTATION = HintCode(
+    'INVALID_NON_VIRTUAL_ANNOTATION',
+    "The member '{0}' can't be '@nonVirtual' because it isn't a concrete instance member.",
+    correction: "Try removing @nonVirtual.",
+  );
+
+  /**
+   * This hint is generated anywhere where an instance member annotated with
+   * `@nonVirtual` is overridden in a subclass.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER = HintCode(
+    'INVALID_OVERRIDE_OF_NON_VIRTUAL_MEMBER',
+    "The member '{0}' is declared non-virtual in '{1}' and can't be overridden in subclasses.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates a named
+   * parameter with a default value.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_NAMED_PARAM = HintCode(
+    'INVALID_REQUIRED_NAMED_PARAM',
+    "The type parameter '{0}' is annotated with @required but only named parameters without a default value can be annotated with it.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates an optional
+   * positional parameter.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM = HintCode(
+    'INVALID_REQUIRED_OPTIONAL_POSITIONAL_PARAM',
+    "Incorrect use of the annotation @required on the optional positional parameter '{0}'. Optional positional parameters cannot be required.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@required` annotates a non optional
+   * positional parameter.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_REQUIRED_POSITIONAL_PARAM = HintCode(
+    'INVALID_REQUIRED_POSITIONAL_PARAM',
+    "Redundant use of the annotation @required on the required positional parameter '{0}'.",
+    correction: "Remove @required.",
+  );
+
+  /**
+   * This hint is generated anywhere where `@sealed` annotates something other
+   * than a class.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_SEALED_ANNOTATION = HintCode(
+    'INVALID_SEALED_ANNOTATION',
+    "The member '{0}' is annotated with '@sealed' but only classes can be annotated with it.",
+    correction: "Remove @sealed.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with `@internal`
+   * is used outside of the package in which it is declared.
+   *
+   * Parameters:
+   * 0: the name of the member
+   */
+  static const HintCode INVALID_USE_OF_INTERNAL_MEMBER = HintCode(
+    'INVALID_USE_OF_INTERNAL_MEMBER',
+    "The member '{0}' can only be used within its package.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with `@protected`
+   * is used outside of an instance member of a subclass.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = HintCode(
+    'INVALID_USE_OF_PROTECTED_MEMBER',
+    "The member '{0}' can only be used within instance members of subclasses of '{1}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance member that is
+  // annotated with `visibleForOverriding` is referenced outside the library in
+  // which it's declared for any reason other than to override it.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` containing the following declaration:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @visibleForOverriding
+  //   void a() {}
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the method `m` is being
+  // invoked even though the only reason it's public is to allow it to be
+  // overridden:
+  //
+  // ```dart
+  // import 'a.dart';
+  //
+  // class B extends A {
+  //   void b() {
+  //     [!a!]();
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the invalid use of the member.
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_OVERRIDING_MEMBER',
+    "The member '{0}' can only be used for overriding.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with
+   * `@visibleForTemplate` is used outside of a "template" Dart file.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER',
+    "The member '{0}' can only be used within '{1}' or a template library.",
+  );
+
+  /**
+   * This hint is generated anywhere where a member annotated with
+   * `@visibleForTesting` is used outside the defining library, or a test.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the defining class
+   */
+  static const HintCode INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER = HintCode(
+    'INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER',
+    "The member '{0}' can only be used within '{1}' or a test.",
+  );
+
+  /**
+   * This hint is generated anywhere where a private declaration is annotated
+   * with `@visibleForTemplate` or `@visibleForTesting`.
+   *
+   * Parameters:
+   * 0: the name of the member
+   * 1: the name of the annotation
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the `@visibleForTemplate`
+  // or `@visibleForTesting` annotation is applied to a non-public declaration.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@visibleForTesting!]
+  // void _someFunction() {}
+  //
+  // void f() => _someFunction();
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the declaration doesn't need to be used by test code, then remove the
+  // annotation:
+  //
+  // ```dart
+  // void _someFunction() {}
+  //
+  // void f() => _someFunction();
+  // ```
+  //
+  // If it does, then make it public:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @visibleForTesting
+  // void someFunction() {}
+  //
+  // void f() => someFunction();
+  // ```
+  static const HintCode INVALID_VISIBILITY_ANNOTATION = HintCode(
+    'INVALID_VISIBILITY_ANNOTATION',
+    "The member '{0}' is annotated with '{1}', but this annotation is only meaningful on declarations of public members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when anything other than a public
+  // instance member of a class is annotated with `visibleForOverriding`.
+  // Because only public instance members can be overridden outside the defining
+  // library, there's no value to annotating any other declarations.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the annotation is on a
+  // class, and classes can't be overridden:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // [!@visibleForOverriding!]
+  // class C {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the annotation:
+  //
+  // ```dart
+  // class C {}
+  // ```
+  static const HintCode INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION = HintCode(
+    'INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION',
+    "The declaration '{0}' is annotated with 'visibleForOverriding'. Because '{0}' isn't an interface member that could be overridden, the annotation is meaningless.",
+  );
+
+  /**
+   * Generate a hint for an element that is annotated with `@JS(...)` whose
+   * library declaration is not similarly annotated.
+   */
+  static const HintCode MISSING_JS_LIB_ANNOTATION = HintCode(
+    'MISSING_JS_LIB_ANNOTATION',
+    "The @JS() annotation can only be used if it is also declared on the library directive.",
+    correction: "Try adding the annotation to the library directive.",
+  );
+
+  /**
+   * Generate a hint for a constructor, function or method invocation where a
+   * required parameter is missing.
+   *
+   * Parameters:
+   * 0: the name of the parameter
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method or function with a
+  // named parameter that is annotated as being required is invoked without
+  // providing a value for the parameter.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the named parameter `x`
+  // is required:
+  //
+  // ```dart
+  // %language=2.9
+  // import 'package:meta/meta.dart';
+  //
+  // void f({@required int x}) {}
+  //
+  // void g() {
+  //   [!f!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Provide the required value:
+  //
+  // ```dart
+  // %language=2.9
+  // import 'package:meta/meta.dart';
+  //
+  // void f({@required int x}) {}
+  //
+  // void g() {
+  //   f(x: 2);
+  // }
+  // ```
+  static const HintCode MISSING_REQUIRED_PARAM = HintCode(
+    'MISSING_REQUIRED_PARAM',
+    "The parameter '{0}' is required.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for a constructor, function or method invocation where a
+   * required parameter is missing.
+   *
+   * Parameters:
+   * 0: the name of the parameter
+   * 1: message details
+   */
+  static const HintCode MISSING_REQUIRED_PARAM_WITH_DETAILS = HintCode(
+    'MISSING_REQUIRED_PARAM',
+    "The parameter '{0}' is required. {1}.",
+    hasPublishedDocs: true,
+    uniqueName: 'MISSING_REQUIRED_PARAM_WITH_DETAILS',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the declared return type
+   */
+  // #### Description
+  //
+  // Any function or method that doesn't end with either an explicit return or a
+  // throw implicitly returns `null`. This is rarely the desired behavior. The
+  // analyzer produces this diagnostic when it finds an implicit return.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `f` doesn't end with a
+  // return:
+  //
+  // ```dart
+  // %language=2.9
+  // int [!f!](int x) {
+  //   if (x < 0) {
+  //     return 0;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add a `return` statement that makes the return value explicit, even if
+  // `null` is the appropriate value.
+  static const HintCode MISSING_RETURN = HintCode(
+    'MISSING_RETURN',
+    "This function has a return type of '{0}', but doesn't end with a return statement.",
+    correction:
+        "Try adding a return statement, or changing the return type to 'void'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * This hint is generated anywhere where a `@sealed` class is used as a
+   * a superclass constraint of a mixin.
+   *
+   * Parameters:
+   * 0: the name of the sealed class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the superclass constraint of a
+  // mixin is a class from a different package that was marked as `@sealed`.
+  // Classes that are sealed can't be extended, implemented, mixed in, or used
+  // as a superclass constraint.
+  //
+  // #### Examples
+  //
+  // If the package `p` defines a sealed class:
+  //
+  // ```dart
+  // %uri="package:p/p.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // @sealed
+  // class C {}
+  // ```
+  //
+  // Then, the following code, when in a package other than `p`, produces this
+  // diagnostic:
+  //
+  // ```dart
+  // import 'package:p/p.dart';
+  //
+  // [!mixin M on C {}!]
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the classes that use the mixin don't need to be subclasses of the sealed
+  // class, then consider adding a field and delegating to the wrapped instance
+  // of the sealed class.
+  static const HintCode MIXIN_ON_SEALED_CLASS = HintCode(
+    'MIXIN_ON_SEALED_CLASS',
+    "The class '{0}' shouldn't be used as a mixin constraint because it is sealed, and any class mixing in this mixin must have '{0}' as a superclass.",
+    correction:
+        "Try composing with this class, or refer to its documentation for more information.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for classes that inherit from classes annotated with
+   * `@immutable` but that are not immutable.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an immutable class defines one
+  // or more instance fields that aren't final. A class is immutable if it's
+  // marked as being immutable using the annotation `@immutable` or if it's a
+  // subclass of an immutable class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field `x` isn't
+  // final:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @immutable
+  // class [!C!] {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If instances of the class should be immutable, then add the keyword `final`
+  // to all non-final field declarations:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @immutable
+  // class C {
+  //   final int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  //
+  // If the instances of the class should be mutable, then remove the
+  // annotation, or choose a different superclass if the annotation is
+  // inherited:
+  //
+  // ```dart
+  // class C {
+  //   int x;
+  //
+  //   C(this.x);
+  // }
+  // ```
+  static const HintCode MUST_BE_IMMUTABLE = HintCode(
+    'MUST_BE_IMMUTABLE',
+    "This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: {0}",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the class declaring the overridden method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a method that overrides a method
+  // that is annotated as `@mustCallSuper` doesn't invoke the overridden method
+  // as required.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the method `m` in `B`
+  // doesn't invoke the overridden method `m` in `A`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @mustCallSuper
+  //   m() {}
+  // }
+  //
+  // class B extends A {
+  //   @override
+  //   [!m!]() {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add an invocation of the overridden method in the overriding method:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class A {
+  //   @mustCallSuper
+  //   m() {}
+  // }
+  //
+  // class B extends A {
+  //   @override
+  //   m() {
+  //     super.m();
+  //   }
+  // }
+  // ```
+  static const HintCode MUST_CALL_SUPER = HintCode(
+    'MUST_CALL_SUPER',
+    "This method overrides a method annotated as '@mustCallSuper' in '{0}', but doesn't invoke the overridden method.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for non-const instance creation using a constructor
+   * annotated with `@literal`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the annotated constructor
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor that has the
+  // `@literal` annotation is invoked without using the `const` keyword, but all
+  // of the arguments to the constructor are constants. The annotation indicates
+  // that the constructor should be used to create a constant value whenever
+  // possible.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  //
+  // C f() => [!C()!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Add the keyword `const` before the constructor invocation:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @literal
+  //   const C();
+  // }
+  //
+  // void f() => const C();
+  // ```
+  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR = HintCode(
+    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
+    "This instance creation must be 'const', because the {0} constructor is marked as '@literal'.",
+    correction: "Try adding a 'const' keyword.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Generate a hint for non-const instance creation (with the `new` keyword)
+   * using a constructor annotated with `@literal`.
+   *
+   * Parameters:
+   * 0: the name of the class defining the annotated constructor
+   */
+  static const HintCode NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW =
+      HintCode(
+    'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR',
+    "This instance creation must be 'const', because the {0} constructor is marked as '@literal'.",
+    correction: "Try replacing the 'new' keyword with 'const'.",
+    hasPublishedDocs: true,
+    uniqueName: 'NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the type following `on` in a
+  // `catch` clause is a nullable type. It isn't valid to specify a nullable
+  // type because it isn't possible to catch `null` (because it's a runtime
+  // error to throw `null`).
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the exception type is
+  // specified to allow `null` when `null` can't be thrown:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on [!FormatException?!] {
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the question mark from the type:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } on FormatException {
+  //   }
+  // }
+  // ```
+  static const HintCode NULLABLE_TYPE_IN_CATCH_CLAUSE = HintCode(
+    'NULLABLE_TYPE_IN_CATCH_CLAUSE',
+    "A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expression.",
+    correction: "Try using a non-nullable type.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the method being invoked
+   * 1: the type argument associated with the method
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when `null` is passed to either the
+  // constructor `Future.value` or the method `Completer.complete` when the type
+  // argument used to create the instance was non-nullable. Even though the type
+  // system can't express this restriction, passing in a `null` results in a
+  // runtime exception.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `null` is being passed
+  // to the constructor `Future.value` even though the type argument is the
+  // non-nullable type `String`:
+  //
+  // ```dart
+  // Future<String> f() {
+  //   return Future.value([!null!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Pass in a non-null value:
+  //
+  // ```dart
+  // Future<String> f() {
+  //   return Future.value('');
+  // }
+  // ```
+  static const HintCode NULL_ARGUMENT_TO_NON_NULL_TYPE = HintCode(
+    'NULL_ARGUMENT_TO_NON_NULL_TYPE',
+    "'{0}' shouldn't be called with a null argument for the non-nullable type argument '{1}'.",
+    correction: "Try adding a non-null argument.",
+  );
+
+  /**
+   * When the left operand of a binary expression uses '?.' operator, it can be
+   * `null`.
+   */
+  static const HintCode NULL_AWARE_BEFORE_OPERATOR = HintCode(
+    'NULL_AWARE_BEFORE_OPERATOR',
+    "The left operand uses '?.', so its value can be null.",
+  );
+
+  /**
+   * A condition in a control flow statement could evaluate to `null` because it
+   * uses the null-aware '?.' operator.
+   */
+  static const HintCode NULL_AWARE_IN_CONDITION = HintCode(
+    'NULL_AWARE_IN_CONDITION',
+    "The value of the '?.' operator can be 'null', which isn't appropriate in a condition.",
+    correction:
+        "Try replacing the '?.' with a '.', testing the left-hand side for null if necessary.",
+  );
+
+  /**
+   * A condition in operands of a logical operator could evaluate to `null`
+   * because it uses the null-aware '?.' operator.
+   */
+  static const HintCode NULL_AWARE_IN_LOGICAL_OPERATOR = HintCode(
+    'NULL_AWARE_IN_LOGICAL_OPERATOR',
+    "The value of the '?.' operator can be 'null', which isn't appropriate as an operand of a logical operator.",
+  );
+
+  /**
+   * This hint indicates that a null literal is null-checked with `!`, but null
+   * is never not null.
+   */
+  static const HintCode NULL_CHECK_ALWAYS_FAILS = HintCode(
+    'NULL_CHECK_ALWAYS_FAILS',
+    "This null-check will always throw an exception because the expression will always evaluate to 'null'.",
+  );
+
+  /**
+   * A field with the override annotation does not override a getter or setter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_FIELD = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The field doesn't override an inherited getter or setter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_FIELD',
+  );
+
+  /**
+   * A getter with the override annotation does not override an existing getter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_GETTER = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The getter doesn't override an inherited getter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_GETTER',
+  );
+
+  /**
+   * A method with the override annotation does not override an existing method.
+   *
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a class member is annotated with
+  // the `@override` annotation, but the member isn’t declared in any of the
+  // supertypes of the class.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `m` isn't declared in
+  // any of the supertypes of `C`:
+  //
+  // ```dart
+  // class C {
+  //   @override
+  //   String [!m!]() => '';
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the member is intended to override a member with a different name, then
+  // update the member to have the same name:
+  //
+  // ```dart
+  // class C {
+  //   @override
+  //   String toString() => '';
+  // }
+  // ```
+  //
+  // If the member is intended to override a member that was removed from the
+  // superclass, then consider removing the member from the subclass.
+  //
+  // If the member can't be removed, then remove the annotation.
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_METHOD = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The method doesn't override an inherited method.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_METHOD',
+  );
+
+  /**
+   * A setter with the override annotation does not override an existing setter.
+   *
+   * No parameters.
+   */
+  static const HintCode OVERRIDE_ON_NON_OVERRIDING_SETTER = HintCode(
+    'OVERRIDE_ON_NON_OVERRIDING_MEMBER',
+    "The setter doesn't override an inherited setter.",
+    correction:
+        "Try updating this class to match the superclass, or removing the override annotation.",
+    hasPublishedDocs: true,
+    uniqueName: 'OVERRIDE_ON_NON_OVERRIDING_SETTER',
+  );
+
+  /**
+   * It is a bad practice for a package import to reference anything outside the
+   * given package, or more generally, it is bad practice for a package import
+   * to contain a "..". For example, a source file should not contain a
+   * directive such as `import 'package:foo/../some.dart'`.
+   */
+  static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = HintCode(
+    'PACKAGE_IMPORT_CONTAINS_DOT_DOT',
+    "A package import shouldn't contain '..'.",
+  );
+
+  /**
+   * It is not an error to call or tear-off a method, setter, or getter, or to
+   * read or write a field, on a receiver of static type `Never`.
+   * Implementations that provide feedback about dead or unreachable code are
+   * encouraged to indicate that any arguments to the invocation are
+   * unreachable.
+   *
+   * It is not an error to apply an expression of type `Never` in the function
+   * position of a function call. Implementations that provide feedback about
+   * dead or unreachable code are encouraged to indicate that any arguments to
+   * the call are unreachable.
+   *
+   * Parameters: none
+   */
+  static const HintCode RECEIVER_OF_TYPE_NEVER = HintCode(
+    'RECEIVER_OF_TYPE_NEVER',
+    "The receiver is of type 'Never', and will never complete with a value.",
+    correction:
+        "Try checking for throw expressions or type errors in the receiver",
+  );
+
+  /**
+   * Users should not return values marked `@doNotStore` from functions,
+   * methods or getters not marked `@doNotStore`.
+   */
+  static const HintCode RETURN_OF_DO_NOT_STORE = HintCode(
+    'RETURN_OF_DO_NOT_STORE',
+    "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless '{1}' is also annotated.",
+    correction: "Annotate '{1}' with 'doNotStore'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the return type as declared in the return statement
+   * 1: the expected return type as defined by the type of the Future
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an invocation of
+  // `Future.catchError` has an argument whose return type isn't compatible with
+  // the type returned by the instance of `Future`. At runtime, the method
+  // `catchError` attempts to return the value from the callback as the result
+  // of the future, which results in another exception being thrown.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `future` is declared to
+  // return an `int` while `callback` is declared to return a `String`, and
+  // `String` isn't a subtype of `int`:
+  //
+  // ```dart
+  // void f(Future<int> future, String Function(dynamic, StackTrace) callback) {
+  //   future.catchError([!callback!]);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the closure being
+  // passed to `catchError` returns an `int` while `future` is declared to
+  // return a `String`:
+  //
+  // ```dart
+  // void f(Future<String> future) {
+  //   future.catchError((error, stackTrace) => [!3!]);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the instance of `Future` is declared correctly, then change the callback
+  // to match:
+  //
+  // ```dart
+  // void f(Future<int> future, int Function(dynamic, StackTrace) callback) {
+  //   future.catchError(callback);
+  // }
+  // ```
+  //
+  // If the declaration of the instance of `Future` is wrong, then change it to
+  // match the callback:
+  //
+  // ```dart
+  // void f(Future<String> future, String Function(dynamic, StackTrace) callback) {
+  //   future.catchError(callback);
+  // }
+  // ```
+  static const HintCode RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR = HintCode(
+    'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
+    "A value of type '{0}' can't be returned by the 'onError' handler because it must be assignable to '{1}'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_OF_INVALID_TYPE_FROM_CATCH_ERROR',
+  );
+
+  /**
+   * Parameters:
+   * 0: the return type of the function
+   * 1: the expected return type as defined by the type of the Future
+   */
+  static const HintCode RETURN_TYPE_INVALID_FOR_CATCH_ERROR = HintCode(
+    'INVALID_RETURN_TYPE_FOR_CATCH_ERROR',
+    "The return type '{0}' isn't assignable to '{1}', as required by 'Future.catchError'.",
+    hasPublishedDocs: true,
+    uniqueName: 'RETURN_TYPE_INVALID_FOR_CATCH_ERROR',
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the class `Future` or
+  // `Stream` is referenced in a library that doesn't import `dart:async` in
+  // code that has an SDK constraint whose lower bound is less than 2.1.0. In
+  // earlier versions, these classes weren't defined in `dart:core`, so the
+  // import was necessary.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.1.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.0.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // void f([!Future!] f) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the classes to be referenced:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then import the
+  // `dart:async` library.
+  //
+  // ```dart
+  // import 'dart:async';
+  //
+  // void f(Future f) {}
+  // ```
+  static const HintCode SDK_VERSION_ASYNC_EXPORTED_FROM_CORE = HintCode(
+    'SDK_VERSION_ASYNC_EXPORTED_FROM_CORE',
+    "The class '{0}' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.",
+    correction:
+        "Try either importing 'dart:async' or updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an `as` expression inside a
+  // [constant context][] is found in code that has an SDK constraint whose
+  // lower bound is less than 2.3.2. Using an `as` expression in a
+  // [constant context][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.2:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // const num n = 3;
+  // const int i = [!n as int!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the expression to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.3.2 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then either rewrite the
+  // code to not use an `as` expression, or change the code so that the `as`
+  // expression isn't in a [constant context][]:
+  //
+  // ```dart
+  // num x = 3;
+  // int y = x as int;
+  // ```
+  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
+    "The use of an as expression in a constant expression wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when any use of the `&`, `|`, or `^`
+  // operators on the class `bool` inside a [constant context][] is found in
+  // code that has an SDK constraint whose lower bound is less than 2.3.2. Using
+  // these operators in a [constant context][] wasn't supported in earlier
+  // versions, so this code won't be able to run against earlier versions of the
+  // SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.2:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // const bool a = true;
+  // const bool b = false;
+  // const bool c = a [!&!] b;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operators to be used:
+  //
+  // ```yaml
+  // environment:
+  //  sdk: '>=2.3.2 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then either rewrite the
+  // code to not use these operators, or change the code so that the expression
+  // isn't in a [constant context][]:
+  //
+  // ```dart
+  // const bool a = true;
+  // const bool b = false;
+  // bool c = a & b;
+  // ```
+  static const HintCode SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_BOOL_OPERATOR_IN_CONST_CONTEXT',
+    "The use of the operator '{0}' for 'bool' operands in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   *
+   * There is also a [ParserError.EXPERIMENT_NOT_ENABLED] code which catches
+   * some cases of constructor tearoff features (like `List<int>.filled;`).
+   * Other constructor tearoff cases are not realized until resolution
+   * (like `List.filled;`).
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor tear-off is found
+  // in code that has an SDK constraint whose lower bound is less than 2.15.
+  // Constructor tear-offs weren't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Example
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.15:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.9.0 <2.15.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // %language=2.14
+  // var setConstructor = [!Set.identity!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.15.0 <2.16.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not use constructor tear-offs:
+  //
+  // ```dart
+  // %language=2.14
+  // var setConstructor = () => Set.identity();
+  // ```
+  static const HintCode SDK_VERSION_CONSTRUCTOR_TEAROFFS = HintCode(
+    'SDK_VERSION_CONSTRUCTOR_TEAROFFS',
+    "Tearing off a constructor requires the 'constructor-tearoffs' language feature.",
+    correction:
+        "Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the operator `==` is used on a
+  // non-primitive type inside a [constant context][] is found in code that has
+  // an SDK constraint whose lower bound is less than 2.3.2. Using this operator
+  // in a [constant context][] wasn't supported in earlier versions, so this
+  // code won't be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.2:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {}
+  // const C a = null;
+  // const C b = null;
+  // const bool same = a [!==!] b;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.3.2 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then either rewrite the
+  // code to not use the `==` operator, or change the code so that the
+  // expression isn't in a [constant context][]:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {}
+  // const C a = null;
+  // const C b = null;
+  // bool same = a == b;
+  // ```
+  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
+    "Using the operator '==' for non-primitive types wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an extension declaration or an
+  // extension override is found in code that has an SDK constraint whose lower
+  // bound is less than 2.6.0. Using extensions wasn't supported in earlier
+  // versions, so this code won't be able to run against earlier versions of the
+  // SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.6.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //  sdk: '>=2.4.0 <2.7.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // [!extension!] E on String {
+  //   void sayHello() {
+  //     print('Hello $this');
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.6.0 <2.7.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of extensions. The most common way to do this is to rewrite
+  // the members of the extension as top-level functions (or methods) that take
+  // the value that would have been bound to `this` as a parameter:
+  //
+  // ```dart
+  // void sayHello(String s) {
+  //   print('Hello $s');
+  // }
+  // ```
+  static const HintCode SDK_VERSION_EXTENSION_METHODS = HintCode(
+    'SDK_VERSION_EXTENSION_METHODS',
+    "Extension methods weren't supported until version 2.6.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the operator `>>>` is used in
+  // code that has an SDK constraint whose lower bound is less than 2.14.0. This
+  // operator wasn't supported in earlier versions, so this code won't be able
+  // to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.14.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //  sdk: '>=2.0.0 <2.15.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // int x = 3 [!>>>!] 4;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the operator to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.14.0 <2.15.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not use the `>>>` operator:
+  //
+  // ```dart
+  // int x = logicalShiftRight(3, 4);
+  //
+  // int logicalShiftRight(int leftOperand, int rightOperand) {
+  //   int divisor = 1 << rightOperand;
+  //   if (divisor == 0) {
+  //     return 0;
+  //   }
+  //   return leftOperand ~/ divisor;
+  // }
+  // ```
+  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = HintCode(
+    'SDK_VERSION_GT_GT_GT_OPERATOR',
+    "The operator '>>>' wasn't supported until version 2.14.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an `is` expression inside a
+  // [constant context][] is found in code that has an SDK constraint whose
+  // lower bound is less than 2.3.2. Using an `is` expression in a
+  // [constant context][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.2:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // const Object x = 4;
+  // const y = [!x is int!] ? 0 : 1;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the expression to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.3.2 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then either rewrite the
+  // code to not use the `is` operator, or, if that isn't possible, change the
+  // code so that the `is` expression isn't in a
+  // [constant context][]:
+  //
+  // ```dart
+  // const Object x = 4;
+  // var y = x is int ? 0 : 1;
+  // ```
+  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
+    "The use of an is expression in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a reference to the class `Never`
+  // is found in code that has an SDK constraint whose lower bound is less than
+  // 2.12.0. This class wasn't defined in earlier versions, so this code won't
+  // be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.12.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.5.0 <2.6.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // [!Never!] n;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the type to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.12.0 <2.13.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not reference this class:
+  //
+  // ```dart
+  // dynamic x;
+  // ```
+  static const HintCode SDK_VERSION_NEVER = HintCode(
+    'SDK_VERSION_NEVER',
+    "The type 'Never' wasn't supported until version 2.12.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a set literal is found in code
+  // that has an SDK constraint whose lower bound is less than 2.2.0. Set
+  // literals weren't supported in earlier versions, so this code won't be able
+  // to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.2.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.1.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces this
+  // diagnostic:
+  //
+  // ```dart
+  // var s = [!<int>{}!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.2.0 <2.4.0'
+  // ```
+  //
+  // If you do need to support older versions of the SDK, then replace the set
+  // literal with code that creates the set without the use of a literal:
+  //
+  // ```dart
+  // var s = new Set<int>();
+  // ```
+  static const HintCode SDK_VERSION_SET_LITERAL = HintCode(
+    'SDK_VERSION_SET_LITERAL',
+    "Set literals weren't supported until version 2.2, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a for, if, or spread element is
+  // found in code that has an SDK constraint whose lower bound is less than
+  // 2.3.0. Using a for, if, or spread element wasn't supported in earlier
+  // versions, so this code won't be able to run against earlier versions of the
+  // SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.3.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.2.0 <2.4.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // var digits = [[!for (int i = 0; i < 10; i++) i!]];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.3.0 <2.4.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of those elements:
+  //
+  // ```dart
+  // var digits = _initializeDigits();
+  //
+  // List<int> _initializeDigits() {
+  //   var digits = <int>[];
+  //   for (int i = 0; i < 10; i++) {
+  //     digits.add(i);
+  //   }
+  //   return digits;
+  // }
+  // ```
+  static const HintCode SDK_VERSION_UI_AS_CODE = HintCode(
+    'SDK_VERSION_UI_AS_CODE',
+    "The for, if, and spread elements weren't supported until version 2.3.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an if or spread element inside
+  // a [constant context][] is found in code that has an SDK constraint whose
+  // lower bound is less than 2.5.0. Using an if or spread element inside a
+  // [constant context][] wasn't supported in earlier versions, so this code
+  // won't be able to run against earlier versions of the SDK.
+  //
+  // #### Examples
+  //
+  // Here's an example of a pubspec that defines an SDK constraint with a lower
+  // bound of less than 2.5.0:
+  //
+  // ```yaml
+  // %uri="pubspec.yaml"
+  // environment:
+  //   sdk: '>=2.4.0 <2.6.0'
+  // ```
+  //
+  // In the package that has that pubspec, code like the following produces
+  // this diagnostic:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // const b = [[!...a!]];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you don't need to support older versions of the SDK, then you can
+  // increase the SDK constraint to allow the syntax to be used:
+  //
+  // ```yaml
+  // environment:
+  //   sdk: '>=2.5.0 <2.6.0'
+  // ```
+  //
+  // If you need to support older versions of the SDK, then rewrite the code to
+  // not make use of those elements:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // const b = [1, 2];
+  // ```
+  //
+  // If that isn't possible, change the code so that the element isn't in a
+  // [constant context][]:
+  //
+  // ```dart
+  // const a = [1, 2];
+  // var b = [...a];
+  // ```
+  static const HintCode SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT = HintCode(
+    'SDK_VERSION_UI_AS_CODE_IN_CONST_CONTEXT',
+    "The if and spread elements weren't supported in constant expressions until version 2.5.0, but this code is required to be able to run on earlier versions.",
+    correction: "Try updating the SDK constraints.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * When "strict-raw-types" is enabled, "raw types" must have type arguments.
+   *
+   * A "raw type" is a type name that does not use inference to fill in missing
+   * type arguments; instead, each type argument is instantiated to its bound.
+   */
+  static const HintCode STRICT_RAW_TYPE = HintCode(
+    'STRICT_RAW_TYPE',
+    "The generic type '{0}' should have explicit type arguments but doesn't.",
+    correction: "Use explicit type arguments for '{0}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the sealed class
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a sealed class (one that either
+  // has the `@sealed` annotation or inherits or mixes in a sealed class) is
+  // referenced in either the `extends`, `implements`, or `with` clause of a
+  // class or mixin declaration if the declaration isn't in the same package as
+  // the sealed class.
+  //
+  // #### Example
+  //
+  // Given a library in a package other than the package being analyzed that
+  // contains the following:
+  //
+  // ```dart
+  // %uri="package:a/a.dart"
+  // import 'package:meta/meta.dart';
+  //
+  // class A {}
+  //
+  // @sealed
+  // class B {}
+  // ```
+  //
+  // The following code produces this diagnostic because `C`, which isn't in the
+  // same package as `B`, is extending the sealed class `B`:
+  //
+  // ```dart
+  // import 'package:a/a.dart';
+  //
+  // [!class C extends B {}!]
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the class doesn't need to be a subtype of the sealed class, then change
+  // the declaration so that it isn't:
+  //
+  // ```dart
+  // import 'package:a/a.dart';
+  //
+  // class B extends A {}
+  // ```
+  //
+  // If the class needs to be a subtype of the sealed class, then either change
+  // the sealed class so that it's no longer sealed or move the subclass into
+  // the same package as the sealed class.
+  static const HintCode SUBTYPE_OF_SEALED_CLASS = HintCode(
+    'SUBTYPE_OF_SEALED_CLASS',
+    "The class '{0}' shouldn't be extended, mixed in, or implemented because it's sealed.",
+    correction:
+        "Try composing instead of inheriting, or refer to the documentation of '{0}' for more information.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's a type check (using the
+  // `as` operator) where the type is `Null`. There's only one value whose type
+  // is `Null`, so the code is both more readable and more performant when it
+  // tests for `null` explicitly.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the code is testing to
+  // see whether the value of `s` is `null` by using a type check:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if ([!s is Null!]) {
+  //     return;
+  //   }
+  //   print(s);
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because the code is testing to
+  // see whether the value of `s` is something other than `null` by using a type
+  // check:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if ([!s is! Null!]) {
+  //     print(s);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Replace the type check with the equivalent comparison with `null`:
+  //
+  // ```dart
+  // void f(String? s) {
+  //   if (s == null) {
+  //     return;
+  //   }
+  //   print(s);
+  // }
+  // ```
+  static const HintCode TYPE_CHECK_IS_NOT_NULL = HintCode(
+    'TYPE_CHECK_WITH_NULL',
+    "Tests for non-null should be done with '!= null'.",
+    correction: "Try replacing the 'is! Null' check with '!= null'.",
+    hasPublishedDocs: true,
+    uniqueName: 'TYPE_CHECK_IS_NOT_NULL',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode TYPE_CHECK_IS_NULL = HintCode(
+    'TYPE_CHECK_WITH_NULL',
+    "Tests for null should be done with '== null'.",
+    correction: "Try replacing the 'is Null' check with '== null'.",
+    hasPublishedDocs: true,
+    uniqueName: 'TYPE_CHECK_IS_NULL',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the library being imported
+   * 1: the name in the hide clause that isn't defined in the library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a hide combinator includes a
+  // name that isn't defined by the library being imported.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `dart:math` doesn't
+  // define the name `String`:
+  //
+  // ```dart
+  // import 'dart:math' hide [!String!], max;
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different name should be hidden, then correct the name. Otherwise,
+  // remove the name from the list:
+  //
+  // ```dart
+  // import 'dart:math' hide max;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNDEFINED_HIDDEN_NAME = HintCode(
+    'UNDEFINED_HIDDEN_NAME',
+    "The library '{0}' doesn't export a member with the hidden name '{1}'.",
+    correction: "Try removing the name from the list of hidden members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the undefined parameter
+   * 1: the name of the targeted member
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an annotation of the form
+  // `@UnusedResult.unless(parameterDefined: parameterName)` specifies a
+  // parameter name that isn't defined by the annotated function.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the function `f`
+  // doesn't have a parameter named `b`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @UseResult.unless(parameterDefined: [!'b'!])
+  // int f([int? a]) => a ?? 0;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Change the argument named `parameterDefined` to match the name of one of
+  // the parameters to the function:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // @UseResult.unless(parameterDefined: 'a')
+  // int f([int? a]) => a ?? 0;
+  // ```
+  static const HintCode UNDEFINED_REFERENCED_PARAMETER = HintCode(
+    'UNDEFINED_REFERENCED_PARAMETER',
+    "The parameter '{0}' is not defined by '{1}'.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the library being imported
+   * 1: the name in the show clause that isn't defined in the library
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a show combinator includes a
+  // name that isn't defined by the library being imported.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `dart:math` doesn't
+  // define the name `String`:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!String!];
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If a different name should be shown, then correct the name. Otherwise,
+  // remove the name from the list:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNDEFINED_SHOWN_NAME = HintCode(
+    'UNDEFINED_SHOWN_NAME',
+    "The library '{0}' doesn't export a member with the shown name '{1}'.",
+    correction: "Try removing the name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the non-diagnostic being ignored
+   */
+  static const HintCode UNIGNORABLE_IGNORE = HintCode(
+    'UNIGNORABLE_IGNORE',
+    "The diagnostic '{0}' can't be ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value being cast is already
+  // known to be of the type that it's being cast to.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `n` is already known to
+  // be an `int` as a result of the `is` test:
+  //
+  // ```dart
+  // void f(num n) {
+  //   if (n is int) {
+  //     ([!n as int!]).isEven;
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary cast:
+  //
+  // ```dart
+  // void f(num n) {
+  //   if (n is int) {
+  //     n.isEven;
+  //   }
+  // }
+  // ```
+  static const HintCode UNNECESSARY_CAST = HintCode(
+    'UNNECESSARY_CAST',
+    "Unnecessary cast.",
+    correction: "Try removing the cast.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the diagnostic being ignored
+   */
+  static const HintCode UNNECESSARY_IGNORE = HintCode(
+    'UNNECESSARY_IGNORE',
+    "The diagnostic '{0}' isn't produced at this location so it doesn't need to be ignored.",
+    correction:
+        "Try removing the name from the list, or removing the whole comment if this is the only name in the list.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the uri that is not necessary
+   * 1: the uri that makes it unnecessary
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import isn't needed because
+  // all of the names that are imported and referenced within the importing
+  // library are also visible through another import.
+  //
+  // #### Example
+  //
+  // Given a file named `a.dart` that contains the following:
+  //
+  // ```dart
+  // %uri="lib/a.dart"
+  // class A {}
+  // ```
+  //
+  // And, given a file named `b.dart` that contains the following:
+  //
+  // ```dart
+  // %uri="lib/b.dart"
+  // export 'a.dart';
+  //
+  // class B {}
+  // ```
+  //
+  // The following code produces this diagnostic because the class `A`, which is
+  // imported from `a.dart`, is also imported from `b.dart`. Removing the import
+  // of `a.dart` leaves the semantics unchanged:
+  //
+  // ```dart
+  // import [!'a.dart'!];
+  // import 'b.dart';
+  //
+  // void f(A a, B b) {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the import isn't needed, then remove it.
+  //
+  // If some of the names imported by this import are intended to be used but
+  // aren't yet, and if those names aren't imported by other imports, then add
+  // the missing references to those names.
+  static const HintCode UNNECESSARY_IMPORT = HintCode(
+    'UNNECESSARY_IMPORT',
+    "The import of '{0}' is unnecessary because all of the used elements are also provided by the import of '{1}'.",
+    correction: "Try removing the import directive.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when there's a declaration of
+  // `noSuchMethod`, the only thing the declaration does is invoke the
+  // overridden declaration, and the overridden declaration isn't the
+  // declaration in `Object`.
+  //
+  // Overriding the implementation of `Object`'s `noSuchMethod` (no matter what
+  // the implementation does) signals to the analyzer that it shouldn't flag any
+  // inherited abstract methods that aren't implemented in that class. This
+  // works even if the overriding implementation is inherited from a superclass,
+  // so there's no value to declare it again in a subclass.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the declaration of
+  // `noSuchMethod` in `A` makes the declaration of `noSuchMethod` in `B`
+  // unnecessary:
+  //
+  // ```dart
+  // class A {
+  //   @override
+  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
+  // }
+  // class B extends A {
+  //   @override
+  //   dynamic [!noSuchMethod!](y) {
+  //     return super.noSuchMethod(y);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unnecessary declaration:
+  //
+  // ```dart
+  // class A {
+  //   @override
+  //   dynamic noSuchMethod(x) => super.noSuchMethod(x);
+  // }
+  // class B extends A {}
+  // ```
+  static const HintCode UNNECESSARY_NO_SUCH_METHOD = HintCode(
+    'UNNECESSARY_NO_SUCH_METHOD',
+    "Unnecessary 'noSuchMethod' declaration.",
+    correction: "Try removing the declaration of 'noSuchMethod'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when it finds an equality comparison
+  // (either `==` or `!=`) with one operand of `null` and the other operand
+  // can't be `null`. Such comparisons are always either `true` or `false`, so
+  // they serve no purpose.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because `x` can never be
+  // `null`, so the comparison always evaluates to `true`:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if (x [!!= null!]) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  //
+  // The following code produces this diagnostic because `x` can never be
+  // `null`, so the comparison always evaluates to `false`:
+  //
+  // ```dart
+  // void f(int x) {
+  //   if (x [!== null!]) {
+  //     throw ArgumentError("x can't be null");
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the other operand should be able to be `null`, then change the type of
+  // the operand:
+  //
+  // ```dart
+  // void f(int? x) {
+  //   if (x != null) {
+  //     print(x);
+  //   }
+  // }
+  // ```
+  //
+  // If the other operand really can't be `null`, then remove the condition:
+  //
+  // ```dart
+  // void f(int x) {
+  //   print(x);
+  // }
+  // ```
+  static const HintCode UNNECESSARY_NULL_COMPARISON_FALSE = HintCode(
+    'UNNECESSARY_NULL_COMPARISON',
+    "The operand can't be null, so the condition is always false.",
+    correction:
+        "Try removing the condition, an enclosing condition, or the whole conditional statement.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_NULL_COMPARISON_FALSE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode UNNECESSARY_NULL_COMPARISON_TRUE = HintCode(
+    'UNNECESSARY_NULL_COMPARISON',
+    "The operand can't be null, so the condition is always true.",
+    correction: "Remove the condition.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_NULL_COMPARISON_TRUE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the type
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when either the type `dynamic` or the
+  // type `Null` is followed by a question mark. Both of these types are
+  // inherently nullable so the question mark doesn't change the semantics.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the question mark
+  // following `dynamic` isn't necessary:
+  //
+  // ```dart
+  // dynamic[!?!] x;
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unneeded question mark:
+  //
+  // ```dart
+  // dynamic x;
+  // ```
+  static const HintCode UNNECESSARY_QUESTION_MARK = HintCode(
+    'UNNECESSARY_QUESTION_MARK',
+    "The '?' is unnecessary because '{0}' is nullable without it.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the value of a type check (using
+  // either `is` or `is!`) is known at compile time.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the test `a is Object?`
+  // is always `true`:
+  //
+  // ```dart
+  // bool f<T>(T a) => [!a is Object?!];
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the type check doesn't check what you intended to check, then change the
+  // test:
+  //
+  // ```dart
+  // bool f<T>(T a) => a is Object;
+  // ```
+  //
+  // If the type check does check what you intended to check, then replace the
+  // type check with its known value or completely remove it:
+  //
+  // ```dart
+  // bool f<T>(T a) => true;
+  // ```
+  static const HintCode UNNECESSARY_TYPE_CHECK_FALSE = HintCode(
+    'UNNECESSARY_TYPE_CHECK',
+    "Unnecessary type check; the result is always 'false'.",
+    correction: "Try correcting the type check, or removing the type check.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_TYPE_CHECK_FALSE',
+  );
+
+  /**
+   * No parameters.
+   */
+  static const HintCode UNNECESSARY_TYPE_CHECK_TRUE = HintCode(
+    'UNNECESSARY_TYPE_CHECK',
+    "Unnecessary type check; the result is always 'true'.",
+    correction: "Try correcting the type check, or removing the type check.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNNECESSARY_TYPE_CHECK_TRUE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the exception variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a `catch` clause is found, and
+  // neither the exception parameter nor the optional stack trace parameter are
+  // used in the `catch` block.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `e` isn't referenced:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     int.parse(';');
+  //   } on FormatException catch ([!e!]) {
+  //     // ignored
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the unused `catch` clause:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     int.parse(';');
+  //   } on FormatException {
+  //     // ignored
+  //   }
+  // }
+  // ```
+  static const HintCode UNUSED_CATCH_CLAUSE = HintCode(
+    'UNUSED_CATCH_CLAUSE',
+    "The exception variable '{0}' isn't used, so the 'catch' clause can be removed.",
+    correction: "Try removing the catch clause.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the stack trace variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when the stack trace parameter in a
+  // `catch` clause isn't referenced within the body of the `catch` block.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `stackTrace` isn't
+  // referenced:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } catch (exception, [!stackTrace!]) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you need to reference the stack trace parameter, then add a reference to
+  // it. Otherwise, remove it:
+  //
+  // ```dart
+  // void f() {
+  //   try {
+  //     // ...
+  //   } catch (exception) {
+  //     // ...
+  //   }
+  // }
+  // ```
+  static const HintCode UNUSED_CATCH_STACK = HintCode(
+    'UNUSED_CATCH_STACK',
+    "The stack trace variable '{0}' isn't used and can be removed.",
+    correction: "Try removing the stack trace variable, or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name that is declared but not referenced
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a private declaration isn't
+  // referenced in the library that contains the declaration. The following
+  // kinds of declarations are analyzed:
+  // - Private top-level declarations, such as classes, enums, mixins, typedefs,
+  //   top-level variables, and top-level functions
+  // - Private static and instance methods
+  // - Optional parameters of private functions for which a value is never
+  //   passed, even when the parameter doesn't have a private name
+  //
+  // #### Examples
+  //
+  // Assuming that no code in the library references `_C`, the following code
+  // produces this diagnostic:
+  //
+  // ```dart
+  // class [!_C!] {}
+  // ```
+  //
+  // Assuming that no code in the library passes a value for `y` in any
+  // invocation of `_m`, the following code produces this diagnostic:
+  //
+  // ```dart
+  // %language=2.9
+  // class C {
+  //   void _m(int x, [int [!y!]]) {}
+  //
+  //   void n() => _m(0);
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the declaration isn't needed, then remove it:
+  //
+  // ```dart
+  // class C {
+  //   void _m(int x) {}
+  //
+  //   void n() => _m(0);
+  // }
+  // ```
+  //
+  // If the declaration is intended to be used, then add the code to use it.
+  static const HintCode UNUSED_ELEMENT = HintCode(
+    'UNUSED_ELEMENT',
+    "The declaration '{0}' isn't referenced.",
+    correction: "Try removing the declaration of '{0}'.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the parameter that is declared but not used
+   */
+  static const HintCode UNUSED_ELEMENT_PARAMETER = HintCode(
+    'UNUSED_ELEMENT',
+    "A value for optional parameter '{0}' isn't ever given.",
+    correction: "Try removing the unused parameter.",
+    hasPublishedDocs: true,
+    uniqueName: 'UNUSED_ELEMENT_PARAMETER',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unused field
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a private field is declared but
+  // never read, even if it's written in one or more places.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the field
+  // `_originalValue` isn't read anywhere in the library:
+  //
+  // ```dart
+  // class C {
+  //   final String [!_originalValue!];
+  //   final String _currentValue;
+  //
+  //   C(this._originalValue) : _currentValue = _originalValue;
+  //
+  //   String get value => _currentValue;
+  // }
+  // ```
+  //
+  // It might appear that the field `_originalValue` is being read in the
+  // initializer (`_currentValue = _originalValue`), but that is actually a
+  // reference to the parameter of the same name, not a reference to the field.
+  //
+  // #### Common fixes
+  //
+  // If the field isn't needed, then remove it.
+  //
+  // If the field was intended to be used, then add the missing code.
+  static const HintCode UNUSED_FIELD = HintCode(
+    'UNUSED_FIELD',
+    "The value of the field '{0}' isn't used.",
+    correction: "Try removing the field, or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the content of the unused import's uri
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an import isn't needed because
+  // none of the names that are imported are referenced within the importing
+  // library.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because nothing defined in
+  // `dart:async` is referenced in the library:
+  //
+  // ```dart
+  // import [!'dart:async'!];
+  //
+  // void main() {}
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the import isn't needed, then remove it.
+  //
+  // If some of the imported names are intended to be used, then add the missing
+  // code.
+  static const HintCode UNUSED_IMPORT = HintCode(
+    'UNUSED_IMPORT',
+    "Unused import: '{0}'.",
+    correction: "Try removing the import directive.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the label that isn't used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a label that isn't used is
+  // found.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the label `loop` isn't
+  // referenced anywhere in the method:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   [!loop:!] for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //   }
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the label isn't needed, then remove it:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //   }
+  // }
+  // ```
+  //
+  // If the label is needed, then use it:
+  //
+  // ```dart
+  // void f(int limit) {
+  //   loop: for (int i = 0; i < limit; i++) {
+  //     print(i);
+  //     break loop;
+  //   }
+  // }
+  // ```
+  // TODO(brianwilkerson) Highlight the identifier without the colon.
+  static const HintCode UNUSED_LABEL = HintCode(
+    'UNUSED_LABEL',
+    "The label '{0}' isn't used.",
+    correction:
+        "Try removing the label, or using it in either a 'break' or 'continue' statement.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the unused variable
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a local variable is declared but
+  // never read, even if it's written in one or more places.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the value of `count` is
+  // never read:
+  //
+  // ```dart
+  // void main() {
+  //   int [!count!] = 0;
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If the variable isn't needed, then remove it.
+  //
+  // If the variable was intended to be used, then add the missing code.
+  static const HintCode UNUSED_LOCAL_VARIABLE = HintCode(
+    'UNUSED_LOCAL_VARIABLE',
+    "The value of the local variable '{0}' isn't used.",
+    correction: "Try removing the variable or using it.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * Parameters:
+   * 0: the name of the annotated method, property or function
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function annotated with
+  // `useResult` is invoked, and the value returned by that function isn't used.
+  // The value is considered to be used if a member of the value is invoked, if
+  // the value is passed to another function, or if the value is assigned to a
+  // variable or field.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the invocation of
+  // `c.a()` isn't used, even though the method `a` is annotated with
+  // `useResult`:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   c.[!a!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // If you intended to invoke the annotated function, then use the value that
+  // was returned:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   print(c.a());
+  // }
+  // ```
+  //
+  // If you intended to invoke a different function, then correct the name of
+  // the function being invoked:
+  //
+  // ```dart
+  // import 'package:meta/meta.dart';
+  //
+  // class C {
+  //   @useResult
+  //   int a() => 0;
+  //
+  //   int b() => 0;
+  // }
+  //
+  // void f(C c) {
+  //   c.b();
+  // }
+  // ```
+  static const HintCode UNUSED_RESULT = HintCode(
+    'UNUSED_RESULT',
+    "The value of '{0}' should be used.",
+    correction:
+        "Try using the result by invoking a member, passing it to a function, or returning it from this function.",
+  );
+
+  /**
+   * The result of invoking a method, property, or function annotated with
+   * `@useResult` must be used (assigned, passed to a function as an argument,
+   * or returned by a function).
+   *
+   * Parameters:
+   * 0: the name of the annotated method, property or function
+   * 1: message details
+   */
+  static const HintCode UNUSED_RESULT_WITH_MESSAGE = HintCode(
+    'UNUSED_RESULT',
+    "'{0}' should be used. {1}.",
+    correction:
+        "Try using the result by invoking a member, passing it to a function, or returning it from this function.",
+    uniqueName: 'UNUSED_RESULT_WITH_MESSAGE',
+  );
+
+  /**
+   * Parameters:
+   * 0: the name that is shown but not used
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a show combinator includes a
+  // name that isn't used within the library. Because it isn't referenced, the
+  // name can be removed.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the function `max`
+  // isn't used:
+  //
+  // ```dart
+  // import 'dart:math' show min, [!max!];
+  //
+  // var x = min(0, 1);
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either use the name or remove it:
+  //
+  // ```dart
+  // import 'dart:math' show min;
+  //
+  // var x = min(0, 1);
+  // ```
+  static const HintCode UNUSED_SHOWN_NAME = HintCode(
+    'UNUSED_SHOWN_NAME',
+    "The name {0} is shown, but isn’t used.",
+    correction: "Try removing the name from the list of shown members.",
+    hasPublishedDocs: true,
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a library is imported using the
+  // `dart-ext` scheme.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the native library `x`
+  // is being imported using a scheme of `dart-ext`:
+  //
+  // ```dart
+  // [!import 'dart-ext:x';!]
+  // int f() native 'string';
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Rewrite the code to use `dart:ffi` as a way of invoking the contents of the
+  // native library.
+  static const HintCode USE_OF_NATIVE_EXTENSION = HintCode(
+    'USE_OF_NATIVE_EXTENSION',
+    "Dart native extensions are deprecated and aren’t available in Dart 2.15.",
+    correction: "Try using dart:ffi for C interop.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const HintCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'HintCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorType.HINT.severity;
+
+  @override
+  ErrorType get type => ErrorType.HINT;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
new file mode 100644
index 0000000..88cb1ff
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.analyzer.g.dart
@@ -0,0 +1,1080 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// THIS FILE IS GENERATED. DO NOT EDIT.
+//
+// Instead modify 'pkg/analyzer/messages.yaml' and run
+// 'dart pkg/analyzer/tool/messages/generate.dart' to update.
+
+import "package:analyzer/error/error.dart";
+
+part "syntactic_errors.g.dart";
+
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
+class ParserErrorCode extends ErrorCode {
+  static const ParserErrorCode ABSTRACT_CLASS_MEMBER = _ABSTRACT_CLASS_MEMBER;
+
+  static const ParserErrorCode ABSTRACT_ENUM = ParserErrorCode(
+    'ABSTRACT_ENUM',
+    "Enums can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD =
+      _ABSTRACT_EXTERNAL_FIELD;
+
+  static const ParserErrorCode ABSTRACT_LATE_FIELD = _ABSTRACT_LATE_FIELD;
+
+  static const ParserErrorCode ABSTRACT_STATIC_FIELD = _ABSTRACT_STATIC_FIELD;
+
+  static const ParserErrorCode ABSTRACT_STATIC_METHOD = ParserErrorCode(
+    'ABSTRACT_STATIC_METHOD',
+    "Static methods can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = ParserErrorCode(
+    'ABSTRACT_TOP_LEVEL_FUNCTION',
+    "Top-level functions can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = ParserErrorCode(
+    'ABSTRACT_TOP_LEVEL_VARIABLE',
+    "Top-level variables can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ABSTRACT_TYPEDEF = ParserErrorCode(
+    'ABSTRACT_TYPEDEF',
+    "Typedefs can't be declared to be 'abstract'.",
+    correction: "Try removing the keyword 'abstract'.",
+  );
+
+  static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT =
+      _ANNOTATION_ON_TYPE_ARGUMENT;
+
+  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
+      _ANNOTATION_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
+      _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
+
+  /**
+   * 16.32 Identifier Reference: It is a compile-time error if any of the
+   * identifiers async, await, or yield is used as an identifier in a function
+   * body marked with either async, async, or sync.
+   */
+  static const ParserErrorCode ASYNC_KEYWORD_USED_AS_IDENTIFIER =
+      ParserErrorCode(
+    'ASYNC_KEYWORD_USED_AS_IDENTIFIER',
+    "The keywords 'await' and 'yield' can't be used as identifiers in an asynchronous or generator function.",
+  );
+
+  static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT =
+      _BINARY_OPERATOR_WRITTEN_OUT;
+
+  static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = _BREAK_OUTSIDE_OF_LOOP;
+
+  static const ParserErrorCode CATCH_SYNTAX = _CATCH_SYNTAX;
+
+  static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS =
+      _CATCH_SYNTAX_EXTRA_PARAMETERS;
+
+  static const ParserErrorCode CLASS_IN_CLASS = _CLASS_IN_CLASS;
+
+  static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
+
+  static const ParserErrorCode CONFLICTING_MODIFIERS = _CONFLICTING_MODIFIERS;
+
+  static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE =
+      _CONSTRUCTOR_WITH_RETURN_TYPE;
+
+  static const ParserErrorCode CONSTRUCTOR_WITH_TYPE_ARGUMENTS =
+      _CONSTRUCTOR_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode CONST_AND_FINAL = _CONST_AND_FINAL;
+
+  static const ParserErrorCode CONST_CLASS = _CONST_CLASS;
+
+  static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
+    'CONST_CONSTRUCTOR_WITH_BODY',
+    "Const constructors can't have a body.",
+    correction: "Try removing either the 'const' keyword or the body.",
+  );
+
+  static const ParserErrorCode CONST_ENUM = ParserErrorCode(
+    'CONST_ENUM',
+    "Enums can't be declared to be 'const'.",
+    correction: "Try removing the 'const' keyword.",
+  );
+
+  static const ParserErrorCode CONST_FACTORY = _CONST_FACTORY;
+
+  static const ParserErrorCode CONST_METHOD = _CONST_METHOD;
+
+  static const ParserErrorCode CONST_TYPEDEF = ParserErrorCode(
+    'CONST_TYPEDEF',
+    "Type aliases can't be declared to be 'const'.",
+    correction: "Try removing the 'const' keyword.",
+  );
+
+  static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP =
+      _CONTINUE_OUTSIDE_OF_LOOP;
+
+  static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE =
+      _CONTINUE_WITHOUT_LABEL_IN_CASE;
+
+  static const ParserErrorCode COVARIANT_AND_STATIC = _COVARIANT_AND_STATIC;
+
+  static const ParserErrorCode COVARIANT_CONSTRUCTOR = ParserErrorCode(
+    'COVARIANT_CONSTRUCTOR',
+    "A constructor can't be declared to be 'covariant'.",
+    correction: "Try removing the keyword 'covariant'.",
+  );
+
+  static const ParserErrorCode COVARIANT_MEMBER = _COVARIANT_MEMBER;
+
+  static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
+      ParserErrorCode(
+    'COVARIANT_TOP_LEVEL_DECLARATION',
+    "Top-level declarations can't be declared to be covariant.",
+    correction: "Try removing the keyword 'covariant'.",
+  );
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a function type associated with
+  // a parameter includes optional parameters that have a default value. This
+  // isn't allowed because the default values of parameters aren't part of the
+  // function's type, and therefore including them doesn't provide any value.
+  //
+  // #### Example
+  //
+  // The following code produces this diagnostic because the parameter `p` has a
+  // default value even though it's part of the type of the parameter `g`:
+  //
+  // ```dart
+  // void f(void Function([int p [!=!] 0]) g) {
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the default value from the function-type's parameter:
+  //
+  // ```dart
+  // void f(void Function([int p]) g) {
+  // }
+  // ```
+  static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE = ParserErrorCode(
+    'DEFAULT_VALUE_IN_FUNCTION_TYPE',
+    "Parameters in a function type can't have default values.",
+    correction: "Try removing the default value.",
+    hasPublishedDocs: true,
+  );
+
+  static const ParserErrorCode DEFERRED_AFTER_PREFIX = _DEFERRED_AFTER_PREFIX;
+
+  static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION =
+      _DIRECTIVE_AFTER_DECLARATION;
+
+  /**
+   * Parameters:
+   * 0: the modifier that was duplicated
+   */
+  static const ParserErrorCode DUPLICATED_MODIFIER = _DUPLICATED_MODIFIER;
+
+  static const ParserErrorCode DUPLICATE_DEFERRED = _DUPLICATE_DEFERRED;
+
+  /**
+   * Parameters:
+   * 0: the label that was duplicated
+   */
+  static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT =
+      _DUPLICATE_LABEL_IN_SWITCH_STATEMENT;
+
+  static const ParserErrorCode DUPLICATE_PREFIX = _DUPLICATE_PREFIX;
+
+  static const ParserErrorCode EMPTY_ENUM_BODY = ParserErrorCode(
+    'EMPTY_ENUM_BODY',
+    "An enum must declare at least one constant name.",
+    correction: "Try declaring a constant.",
+  );
+
+  static const ParserErrorCode ENUM_IN_CLASS = _ENUM_IN_CLASS;
+
+  static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND =
+      _EQUALITY_CANNOT_BE_EQUALITY_OPERAND;
+
+  static const ParserErrorCode EXPECTED_BODY = _EXPECTED_BODY;
+
+  static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = ParserErrorCode(
+    'EXPECTED_CASE_OR_DEFAULT',
+    "Expected 'case' or 'default'.",
+    correction: "Try placing this code inside a case clause.",
+  );
+
+  static const ParserErrorCode EXPECTED_CLASS_MEMBER = ParserErrorCode(
+    'EXPECTED_CLASS_MEMBER',
+    "Expected a class member.",
+    correction: "Try placing this code inside a class member.",
+  );
+
+  static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
+
+  static const ParserErrorCode EXPECTED_EXECUTABLE = ParserErrorCode(
+    'EXPECTED_EXECUTABLE',
+    "Expected a method, getter, setter or operator declaration.",
+    correction:
+        "This appears to be incomplete code. Try removing it or completing it.",
+  );
+
+  static const ParserErrorCode EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD =
+      _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD;
+
+  static const ParserErrorCode EXPECTED_INSTEAD = _EXPECTED_INSTEAD;
+
+  static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = ParserErrorCode(
+    'EXPECTED_LIST_OR_MAP_LITERAL',
+    "Expected a list or map literal.",
+    correction:
+        "Try inserting a list or map literal, or remove the type arguments.",
+  );
+
+  static const ParserErrorCode EXPECTED_STRING_LITERAL = ParserErrorCode(
+    'EXPECTED_STRING_LITERAL',
+    "Expected a string literal.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the token that was expected but not found
+   */
+  static const ParserErrorCode EXPECTED_TOKEN = ParserErrorCode(
+    'EXPECTED_TOKEN',
+    "Expected to find '{0}'.",
+  );
+
+  static const ParserErrorCode EXPECTED_TYPE_NAME = ParserErrorCode(
+    'EXPECTED_TYPE_NAME',
+    "Expected a type name.",
+  );
+
+  static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
+
+  static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
+      _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an abstract declaration is
+  // declared in an extension. Extensions can declare only concrete members.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because the method `a` doesn't
+  // have a body:
+  //
+  // ```dart
+  // extension E on String {
+  //   int [!a!]();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Either provide an implementation for the member or remove it.
+  static const ParserErrorCode EXTENSION_DECLARES_ABSTRACT_MEMBER =
+      _EXTENSION_DECLARES_ABSTRACT_MEMBER;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a constructor declaration is
+  // found in an extension. It isn't valid to define a constructor because
+  // extensions aren't classes, and it isn't possible to create an instance of
+  // an extension.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because there is a constructor
+  // declaration in `E`:
+  //
+  // ```dart
+  // extension E on String {
+  //   [!E!]() : super();
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the constructor or replace it with a static method.
+  static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR =
+      _EXTENSION_DECLARES_CONSTRUCTOR;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when an instance field declaration is
+  // found in an extension. It isn't valid to define an instance field because
+  // extensions can only add behavior, not state.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `s` is an instance
+  // field:
+  //
+  // ```dart
+  // %language=2.9
+  // extension E on String {
+  //   String [!s!];
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the field, make it a static field, or convert it to be a getter,
+  // setter, or method.
+  static const ParserErrorCode EXTENSION_DECLARES_INSTANCE_FIELD =
+      _EXTENSION_DECLARES_INSTANCE_FIELD;
+
+  static const ParserErrorCode EXTERNAL_CLASS = _EXTERNAL_CLASS;
+
+  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY =
+      _EXTERNAL_CONSTRUCTOR_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER =
+      _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER;
+
+  static const ParserErrorCode EXTERNAL_ENUM = _EXTERNAL_ENUM;
+
+  static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION =
+      _EXTERNAL_FACTORY_REDIRECTION;
+
+  static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY =
+      _EXTERNAL_FACTORY_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_FIELD = _EXTERNAL_FIELD;
+
+  static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_GETTER_WITH_BODY',
+    "External getters can't have a body.",
+    correction:
+        "Try removing the body of the getter, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_LATE_FIELD = _EXTERNAL_LATE_FIELD;
+
+  static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY =
+      _EXTERNAL_METHOD_WITH_BODY;
+
+  static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_OPERATOR_WITH_BODY',
+    "External operators can't have a body.",
+    correction:
+        "Try removing the body of the operator, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = ParserErrorCode(
+    'EXTERNAL_SETTER_WITH_BODY',
+    "External setters can't have a body.",
+    correction:
+        "Try removing the body of the setter, or removing the keyword 'external'.",
+  );
+
+  static const ParserErrorCode EXTERNAL_TYPEDEF = _EXTERNAL_TYPEDEF;
+
+  static const ParserErrorCode EXTRANEOUS_MODIFIER = _EXTRANEOUS_MODIFIER;
+
+  static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
+      _FACTORY_TOP_LEVEL_DECLARATION;
+
+  static const ParserErrorCode FACTORY_WITHOUT_BODY = ParserErrorCode(
+    'FACTORY_WITHOUT_BODY',
+    "A non-redirecting 'factory' constructor must have a body.",
+    correction: "Try adding a body to the constructor.",
+  );
+
+  static const ParserErrorCode FACTORY_WITH_INITIALIZERS = ParserErrorCode(
+    'FACTORY_WITH_INITIALIZERS',
+    "A 'factory' constructor can't have initializers.",
+    correction:
+        "Try removing the 'factory' keyword to make this a generative constructor, or removing the initializers.",
+  );
+
+  static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+      _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
+
+  static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
+      _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
+
+  static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
+
+  static const ParserErrorCode FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
+      _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER;
+
+  static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
+
+  static const ParserErrorCode FINAL_CLASS = ParserErrorCode(
+    'FINAL_CLASS',
+    "Classes can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_CONSTRUCTOR = ParserErrorCode(
+    'FINAL_CONSTRUCTOR',
+    "A constructor can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_ENUM = ParserErrorCode(
+    'FINAL_ENUM',
+    "Enums can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_METHOD = ParserErrorCode(
+    'FINAL_METHOD',
+    "Getters, setters and methods can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FINAL_TYPEDEF = ParserErrorCode(
+    'FINAL_TYPEDEF',
+    "Typedefs can't be declared to be 'final'.",
+    correction: "Try removing the keyword 'final'.",
+  );
+
+  static const ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = ParserErrorCode(
+    'FUNCTION_TYPED_PARAMETER_VAR',
+    "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.",
+    correction: "Try replacing the keyword with a return type.",
+  );
+
+  static const ParserErrorCode GETTER_CONSTRUCTOR = _GETTER_CONSTRUCTOR;
+
+  static const ParserErrorCode GETTER_IN_FUNCTION = ParserErrorCode(
+    'GETTER_IN_FUNCTION',
+    "Getters can't be defined within methods or functions.",
+    correction:
+        "Try moving the getter outside the method or function, or converting the getter to a function.",
+  );
+
+  static const ParserErrorCode GETTER_WITH_PARAMETERS = ParserErrorCode(
+    'GETTER_WITH_PARAMETERS',
+    "Getters must be declared without a parameter list.",
+    correction:
+        "Try removing the parameter list, or removing the keyword 'get' to define a method rather than a getter.",
+  );
+
+  static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE =
+      _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS =
+      _IMPLEMENTS_BEFORE_EXTENDS;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_ON = _IMPLEMENTS_BEFORE_ON;
+
+  static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = _IMPLEMENTS_BEFORE_WITH;
+
+  static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
+      _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
+
+  static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH =
+      _INITIALIZED_VARIABLE_IN_FOR_EACH;
+
+  static const ParserErrorCode INVALID_AWAIT_IN_FOR = _INVALID_AWAIT_IN_FOR;
+
+  /**
+   * Parameters:
+   * 0: the invalid escape sequence
+   */
+  static const ParserErrorCode INVALID_CODE_POINT = ParserErrorCode(
+    'INVALID_CODE_POINT',
+    "The escape sequence '{0}' isn't a valid code point.",
+  );
+
+  static const ParserErrorCode INVALID_COMMENT_REFERENCE = ParserErrorCode(
+    'INVALID_COMMENT_REFERENCE',
+    "Comment references should contain a possibly prefixed identifier and can start with 'new', but shouldn't contain anything else.",
+  );
+
+  static const ParserErrorCode INVALID_CONSTRUCTOR_NAME =
+      _INVALID_CONSTRUCTOR_NAME;
+
+  static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = ParserErrorCode(
+    'INVALID_GENERIC_FUNCTION_TYPE',
+    "Invalid generic function type.",
+    correction:
+        "Try using a generic function type (returnType 'Function(' parameters ')').",
+  );
+
+  static const ParserErrorCode INVALID_HEX_ESCAPE = _INVALID_HEX_ESCAPE;
+
+  static const ParserErrorCode INVALID_INITIALIZER = _INVALID_INITIALIZER;
+
+  static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
+      ParserErrorCode(
+    'INVALID_LITERAL_IN_CONFIGURATION',
+    "The literal in a configuration can't contain interpolation.",
+    correction: "Try removing the interpolation expressions.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the operator that is invalid
+   */
+  static const ParserErrorCode INVALID_OPERATOR = _INVALID_OPERATOR;
+
+  /**
+   * Parameters:
+   * 0: the operator being applied to 'super'
+   *
+   * Only generated by the old parser.
+   * Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
+   */
+  static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = ParserErrorCode(
+    'INVALID_OPERATOR_FOR_SUPER',
+    "The operator '{0}' can't be used with 'super'.",
+  );
+
+  static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
+      _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
+
+  static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = ParserErrorCode(
+    'INVALID_STAR_AFTER_ASYNC',
+    "The modifier 'async*' isn't allowed for an expression function body.",
+    correction: "Try converting the body to a block.",
+  );
+
+  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
+      _INVALID_SUPER_IN_INITIALIZER;
+
+  static const ParserErrorCode INVALID_SYNC = ParserErrorCode(
+    'INVALID_SYNC',
+    "The modifier 'sync' isn't allowed for an expression function body.",
+    correction: "Try converting the body to a block.",
+  );
+
+  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
+      _INVALID_THIS_IN_INITIALIZER;
+
+  static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
+
+  /**
+   * No parameters.
+   */
+  // #### Description
+  //
+  // The analyzer produces this diagnostic when a member declared inside an
+  // extension uses the keyword `covariant` in the declaration of a parameter.
+  // Extensions aren't classes and don't have subclasses, so the keyword serves
+  // no purpose.
+  //
+  // #### Examples
+  //
+  // The following code produces this diagnostic because `i` is marked as being
+  // covariant:
+  //
+  // ```dart
+  // extension E on String {
+  //   void a([!covariant!] int i) {}
+  // }
+  // ```
+  //
+  // #### Common fixes
+  //
+  // Remove the `covariant` keyword:
+  //
+  // ```dart
+  // extension E on String {
+  //   void a(int i) {}
+  // }
+  // ```
+  static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
+      _INVALID_USE_OF_COVARIANT_IN_EXTENSION;
+
+  static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
+      _LIBRARY_DIRECTIVE_NOT_FIRST;
+
+  static const ParserErrorCode LITERAL_WITH_CLASS = _LITERAL_WITH_CLASS;
+
+  static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW =
+      _LITERAL_WITH_CLASS_AND_NEW;
+
+  static const ParserErrorCode LITERAL_WITH_NEW = _LITERAL_WITH_NEW;
+
+  static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER =
+      ParserErrorCode(
+    'LOCAL_FUNCTION_DECLARATION_MODIFIER',
+    "Local function declarations can't specify any modifiers.",
+    correction: "Try removing the modifier.",
+  );
+
+  static const ParserErrorCode MEMBER_WITH_CLASS_NAME = _MEMBER_WITH_CLASS_NAME;
+
+  static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR =
+      _MISSING_ASSIGNABLE_SELECTOR;
+
+  static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
+      _MISSING_ASSIGNMENT_IN_INITIALIZER;
+
+  static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
+      _MISSING_CATCH_OR_FINALLY;
+
+  static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = ParserErrorCode(
+    'MISSING_CLOSING_PARENTHESIS',
+    "The closing parenthesis is missing.",
+    correction: "Try adding the closing parenthesis.",
+  );
+
+  static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE =
+      _MISSING_CONST_FINAL_VAR_OR_TYPE;
+
+  static const ParserErrorCode MISSING_ENUM_BODY = ParserErrorCode(
+    'MISSING_ENUM_BODY',
+    "An enum definition must have a body with at least one constant name.",
+    correction: "Try adding a body and defining at least one constant.",
+  );
+
+  static const ParserErrorCode MISSING_EXPRESSION_IN_INITIALIZER =
+      ParserErrorCode(
+    'MISSING_EXPRESSION_IN_INITIALIZER',
+    "Expected an expression after the assignment operator.",
+    correction:
+        "Try adding the value to be assigned, or remove the assignment operator.",
+  );
+
+  static const ParserErrorCode MISSING_EXPRESSION_IN_THROW =
+      _MISSING_EXPRESSION_IN_THROW;
+
+  static const ParserErrorCode MISSING_FUNCTION_BODY = ParserErrorCode(
+    'MISSING_FUNCTION_BODY',
+    "A function body must be provided.",
+    correction: "Try adding a function body.",
+  );
+
+  static const ParserErrorCode MISSING_FUNCTION_KEYWORD = ParserErrorCode(
+    'MISSING_FUNCTION_KEYWORD',
+    "Function types must have the keyword 'Function' before the parameter list.",
+    correction: "Try adding the keyword 'Function'.",
+  );
+
+  static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = ParserErrorCode(
+    'MISSING_FUNCTION_PARAMETERS',
+    "Functions must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_GET = ParserErrorCode(
+    'MISSING_GET',
+    "Getters must have the keyword 'get' before the getter name.",
+    correction: "Try adding the keyword 'get'.",
+  );
+
+  static const ParserErrorCode MISSING_IDENTIFIER = ParserErrorCode(
+    'MISSING_IDENTIFIER',
+    "Expected an identifier.",
+  );
+
+  static const ParserErrorCode MISSING_INITIALIZER = _MISSING_INITIALIZER;
+
+  static const ParserErrorCode MISSING_KEYWORD_OPERATOR =
+      _MISSING_KEYWORD_OPERATOR;
+
+  static const ParserErrorCode MISSING_METHOD_PARAMETERS = ParserErrorCode(
+    'MISSING_METHOD_PARAMETERS',
+    "Methods must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_FOR_NAMED_PARAMETER =
+      ParserErrorCode(
+    'MISSING_NAME_FOR_NAMED_PARAMETER',
+    "Named parameters in a function type must have a name",
+    correction:
+        "Try providing a name for the parameter or removing the curly braces.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE =
+      ParserErrorCode(
+    'MISSING_NAME_IN_LIBRARY_DIRECTIVE',
+    "Library directives must include a library name.",
+    correction:
+        "Try adding a library name after the keyword 'library', or remove the library directive if the library doesn't have any parts.",
+  );
+
+  static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE =
+      ParserErrorCode(
+    'MISSING_NAME_IN_PART_OF_DIRECTIVE',
+    "Part-of directives must include a library name.",
+    correction: "Try adding a library name after the 'of'.",
+  );
+
+  static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT =
+      _MISSING_PREFIX_IN_DEFERRED_IMPORT;
+
+  static const ParserErrorCode MISSING_STAR_AFTER_SYNC = ParserErrorCode(
+    'MISSING_STAR_AFTER_SYNC',
+    "The modifier 'sync' must be followed by a star ('*').",
+    correction: "Try removing the modifier, or add a star.",
+  );
+
+  static const ParserErrorCode MISSING_STATEMENT = _MISSING_STATEMENT;
+
+  /**
+   * Parameters:
+   * 0: the terminator that is missing
+   */
+  static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'MISSING_TERMINATOR_FOR_PARAMETER_GROUP',
+    "There is no '{0}' to close the parameter group.",
+    correction: "Try inserting a '{0}' at the end of the group.",
+  );
+
+  static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = ParserErrorCode(
+    'MISSING_TYPEDEF_PARAMETERS',
+    "Typedefs must have an explicit list of parameters.",
+    correction: "Try adding a parameter list.",
+  );
+
+  static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = ParserErrorCode(
+    'MISSING_VARIABLE_IN_FOR_EACH',
+    "A loop variable must be declared in a for-each loop before the 'in', but none was found.",
+    correction: "Try declaring a loop variable.",
+  );
+
+  static const ParserErrorCode MIXED_PARAMETER_GROUPS = ParserErrorCode(
+    'MIXED_PARAMETER_GROUPS',
+    "Can't have both positional and named parameters in a single parameter list.",
+    correction: "Try choosing a single style of optional parameters.",
+  );
+
+  static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR =
+      _MIXIN_DECLARES_CONSTRUCTOR;
+
+  static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
+
+  static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
+      _MULTIPLE_EXTENDS_CLAUSES;
+
+  static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = ParserErrorCode(
+    'MULTIPLE_IMPLEMENTS_CLAUSES',
+    "Each class or mixin definition can have at most one implements clause.",
+    correction:
+        "Try combining all of the implements clauses into a single clause.",
+  );
+
+  static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES =
+      _MULTIPLE_LIBRARY_DIRECTIVES;
+
+  static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS =
+      ParserErrorCode(
+    'MULTIPLE_NAMED_PARAMETER_GROUPS',
+    "Can't have multiple groups of named parameters in a single parameter list.",
+    correction: "Try combining all of the groups into a single group.",
+  );
+
+  static const ParserErrorCode MULTIPLE_ON_CLAUSES = _MULTIPLE_ON_CLAUSES;
+
+  static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
+      _MULTIPLE_PART_OF_DIRECTIVES;
+
+  static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS =
+      ParserErrorCode(
+    'MULTIPLE_POSITIONAL_PARAMETER_GROUPS',
+    "Can't have multiple groups of positional parameters in a single parameter list.",
+    correction: "Try combining all of the groups into a single group.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the number of variables being declared
+   */
+  static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = ParserErrorCode(
+    'MULTIPLE_VARIABLES_IN_FOR_EACH',
+    "A single loop variable must be declared in a for-each loop before the 'in', but {0} were found.",
+    correction:
+        "Try moving all but one of the declarations inside the loop body.",
+  );
+
+  static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS =
+      _MULTIPLE_VARIANCE_MODIFIERS;
+
+  static const ParserErrorCode MULTIPLE_WITH_CLAUSES = _MULTIPLE_WITH_CLAUSES;
+
+  static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = ParserErrorCode(
+    'NAMED_FUNCTION_EXPRESSION',
+    "Function expressions can't be named.",
+    correction:
+        "Try removing the name, or moving the function expression to a function declaration statement.",
+  );
+
+  static const ParserErrorCode NAMED_FUNCTION_TYPE = ParserErrorCode(
+    'NAMED_FUNCTION_TYPE',
+    "Function types can't be named.",
+    correction: "Try replacing the name with the keyword 'Function'.",
+  );
+
+  static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
+    'NAMED_PARAMETER_OUTSIDE_GROUP',
+    "Named parameters must be enclosed in curly braces ('{' and '}').",
+    correction: "Try surrounding the named parameters in curly braces.",
+  );
+
+  static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = ParserErrorCode(
+    'NATIVE_CLAUSE_IN_NON_SDK_CODE',
+    "Native clause can only be used in the SDK and code that is loaded through native extensions.",
+    correction: "Try removing the native clause.",
+  );
+
+  static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
+      _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION;
+
+  static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE =
+      ParserErrorCode(
+    'NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE',
+    "Native functions can only be declared in the SDK and code that is loaded through native extensions.",
+    correction: "Try removing the word 'native'.",
+  );
+
+  static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = ParserErrorCode(
+    'NON_CONSTRUCTOR_FACTORY',
+    "Only a constructor can be declared to be a factory.",
+    correction: "Try removing the keyword 'factory'.",
+  );
+
+  static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = ParserErrorCode(
+    'NON_IDENTIFIER_LIBRARY_NAME',
+    "The name of a library must be an identifier.",
+    correction: "Try using an identifier as the name of the library.",
+  );
+
+  static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = ParserErrorCode(
+    'NON_PART_OF_DIRECTIVE_IN_PART',
+    "The part-of directive must be the only directive in a part.",
+    correction:
+        "Try removing the other directives, or moving them to the library for which this is a part.",
+  );
+
+  static const ParserErrorCode NON_STRING_LITERAL_AS_URI = ParserErrorCode(
+    'NON_STRING_LITERAL_AS_URI',
+    "The URI must be a string literal.",
+    correction: "Try enclosing the URI in either single or double quotes.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the operator that the user is trying to define
+   */
+  static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = ParserErrorCode(
+    'NON_USER_DEFINABLE_OPERATOR',
+    "The operator '{0}' isn't user definable.",
+  );
+
+  static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS =
+      ParserErrorCode(
+    'NORMAL_BEFORE_OPTIONAL_PARAMETERS',
+    "Normal parameters must occur before optional parameters.",
+    correction:
+        "Try moving all of the normal parameters before the optional parameters.",
+  );
+
+  static const ParserErrorCode NULL_AWARE_CASCADE_OUT_OF_ORDER =
+      _NULL_AWARE_CASCADE_OUT_OF_ORDER;
+
+  static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT =
+      ParserErrorCode(
+    'POSITIONAL_AFTER_NAMED_ARGUMENT',
+    "Positional arguments must occur before named arguments.",
+    correction:
+        "Try moving all of the positional arguments before the named arguments.",
+  );
+
+  static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP =
+      ParserErrorCode(
+    'POSITIONAL_PARAMETER_OUTSIDE_GROUP',
+    "Positional parameters must be enclosed in square brackets ('[' and ']').",
+    correction: "Try surrounding the positional parameters in square brackets.",
+  );
+
+  static const ParserErrorCode PREFIX_AFTER_COMBINATOR =
+      _PREFIX_AFTER_COMBINATOR;
+
+  static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
+      _REDIRECTING_CONSTRUCTOR_WITH_BODY;
+
+  static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
+      _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR;
+
+  static const ParserErrorCode SETTER_CONSTRUCTOR = _SETTER_CONSTRUCTOR;
+
+  static const ParserErrorCode SETTER_IN_FUNCTION = ParserErrorCode(
+    'SETTER_IN_FUNCTION',
+    "Setters can't be defined within methods or functions.",
+    correction: "Try moving the setter outside the method or function.",
+  );
+
+  static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
+
+  static const ParserErrorCode STATIC_CONSTRUCTOR = _STATIC_CONSTRUCTOR;
+
+  static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = ParserErrorCode(
+    'STATIC_GETTER_WITHOUT_BODY',
+    "A 'static' getter must have a body.",
+    correction:
+        "Try adding a body to the getter, or removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode STATIC_OPERATOR = _STATIC_OPERATOR;
+
+  static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = ParserErrorCode(
+    'STATIC_SETTER_WITHOUT_BODY',
+    "A 'static' setter must have a body.",
+    correction:
+        "Try adding a body to the setter, or removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = ParserErrorCode(
+    'STATIC_TOP_LEVEL_DECLARATION',
+    "Top-level declarations can't be declared to be static.",
+    correction: "Try removing the keyword 'static'.",
+  );
+
+  static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE =
+      _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE;
+
+  static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES =
+      _SWITCH_HAS_MULTIPLE_DEFAULT_CASES;
+
+  static const ParserErrorCode TOP_LEVEL_OPERATOR = _TOP_LEVEL_OPERATOR;
+
+  static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
+
+  static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
+      _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
+
+  static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
+
+  static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
+      _TYPE_PARAMETER_ON_CONSTRUCTOR;
+
+  /**
+   * 7.1.1 Operators: Type parameters are not syntactically supported on an
+   * operator.
+   */
+  static const ParserErrorCode TYPE_PARAMETER_ON_OPERATOR = ParserErrorCode(
+    'TYPE_PARAMETER_ON_OPERATOR',
+    "Types parameters aren't allowed when defining an operator.",
+    correction: "Try removing the type parameters.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the starting character that was missing
+   */
+  static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP',
+    "There is no '{0}' to open a parameter group.",
+    correction: "Try inserting the '{0}' at the appropriate location.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the unexpected text that was found
+   */
+  static const ParserErrorCode UNEXPECTED_TOKEN = ParserErrorCode(
+    'UNEXPECTED_TOKEN',
+    "Unexpected text '{0}'.",
+    correction: "Try removing the text.",
+  );
+
+  static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
+
+  static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
+
+  static const ParserErrorCode VAR_CLASS = ParserErrorCode(
+    'VAR_CLASS',
+    "Classes can't be declared to be 'var'.",
+    correction: "Try removing the keyword 'var'.",
+  );
+
+  static const ParserErrorCode VAR_ENUM = ParserErrorCode(
+    'VAR_ENUM',
+    "Enums can't be declared to be 'var'.",
+    correction: "Try removing the keyword 'var'.",
+  );
+
+  static const ParserErrorCode VAR_RETURN_TYPE = _VAR_RETURN_TYPE;
+
+  static const ParserErrorCode VAR_TYPEDEF = ParserErrorCode(
+    'VAR_TYPEDEF',
+    "Typedefs can't be declared to be 'var'.",
+    correction:
+        "Try removing the keyword 'var', or replacing it with the name of the return type.",
+  );
+
+  static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
+      _VOID_WITH_TYPE_ARGUMENTS;
+
+  static const ParserErrorCode WITH_BEFORE_EXTENDS = _WITH_BEFORE_EXTENDS;
+
+  static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
+      ParserErrorCode(
+    'WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
+    "The default value of a positional parameter should be preceded by '='.",
+    correction: "Try replacing the ':' with '='.",
+  );
+
+  /**
+   * Parameters:
+   * 0: the terminator that was expected
+   * 1: the terminator that was found
+   */
+  static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP =
+      ParserErrorCode(
+    'WRONG_TERMINATOR_FOR_PARAMETER_GROUP',
+    "Expected '{0}' to close parameter group.",
+    correction: "Try replacing '{0}' with '{1}'.",
+  );
+
+  /// Initialize a newly created error code to have the given [name].
+  const ParserErrorCode(
+    String name,
+    String message, {
+    String? correction,
+    bool hasPublishedDocs = false,
+    bool isUnresolvedIdentifier = false,
+    String? uniqueName,
+  }) : super(
+          correction: correction,
+          hasPublishedDocs: hasPublishedDocs,
+          isUnresolvedIdentifier: isUnresolvedIdentifier,
+          message: message,
+          name: name,
+          uniqueName: 'ParserErrorCode.${uniqueName ?? name}',
+        );
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
+
+  @override
+  ErrorType get type => ErrorType.SYNTACTIC_ERROR;
+}
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 7aea6d5..6d60a5f 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -2,958 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The errors produced during syntactic analysis (scanning and parsing).
- */
-import 'package:analyzer/error/error.dart';
-
 export 'package:_fe_analyzer_shared/src/scanner/errors.dart'
     show ScannerErrorCode;
-
-part 'syntactic_errors.g.dart';
-
-/**
- * The error codes used for errors detected by the parser. The convention for
- * this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what
- * is wrong and, when appropriate, how the problem can be corrected.
- */
-class ParserErrorCode extends ErrorCode {
-  static const ParserErrorCode ABSTRACT_CLASS_MEMBER = _ABSTRACT_CLASS_MEMBER;
-
-  static const ParserErrorCode ABSTRACT_ENUM = ParserErrorCode(
-      'ABSTRACT_ENUM', "Enums can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_EXTERNAL_FIELD =
-      _ABSTRACT_EXTERNAL_FIELD;
-
-  static const ParserErrorCode ABSTRACT_LATE_FIELD = _ABSTRACT_LATE_FIELD;
-
-  static const ParserErrorCode ABSTRACT_STATIC_FIELD = _ABSTRACT_STATIC_FIELD;
-
-  static const ParserErrorCode ABSTRACT_STATIC_METHOD = ParserErrorCode(
-      'ABSTRACT_STATIC_METHOD',
-      "Static methods can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TOP_LEVEL_FUNCTION = ParserErrorCode(
-      'ABSTRACT_TOP_LEVEL_FUNCTION',
-      "Top-level functions can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TOP_LEVEL_VARIABLE = ParserErrorCode(
-      'ABSTRACT_TOP_LEVEL_VARIABLE',
-      "Top-level variables can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ABSTRACT_TYPEDEF = ParserErrorCode(
-      'ABSTRACT_TYPEDEF', "Typedefs can't be declared to be 'abstract'.",
-      correction: "Try removing the keyword 'abstract'.");
-
-  static const ParserErrorCode ANNOTATION_ON_TYPE_ARGUMENT =
-      _ANNOTATION_ON_TYPE_ARGUMENT;
-
-  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS =
-      _ANNOTATION_WITH_TYPE_ARGUMENTS;
-
-  static const ParserErrorCode ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
-      _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED;
-
-  /**
-   * 16.32 Identifier Reference: It is a compile-time error if any of the
-   * identifiers async, await, or yield is used as an identifier in a function
-   * body marked with either async, async*, or sync*.
-   */
-  static const ParserErrorCode ASYNC_KEYWORD_USED_AS_IDENTIFIER =
-      ParserErrorCode(
-          'ASYNC_KEYWORD_USED_AS_IDENTIFIER',
-          "The keywords 'await' and 'yield' can't be used as "
-              "identifiers in an asynchronous or generator function.");
-
-  static const ParserErrorCode BINARY_OPERATOR_WRITTEN_OUT =
-      _BINARY_OPERATOR_WRITTEN_OUT;
-
-  static const ParserErrorCode BREAK_OUTSIDE_OF_LOOP = _BREAK_OUTSIDE_OF_LOOP;
-
-  static const ParserErrorCode CATCH_SYNTAX = _CATCH_SYNTAX;
-
-  static const ParserErrorCode CATCH_SYNTAX_EXTRA_PARAMETERS =
-      _CATCH_SYNTAX_EXTRA_PARAMETERS;
-
-  static const ParserErrorCode CLASS_IN_CLASS = _CLASS_IN_CLASS;
-
-  static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
-
-  static const ParserErrorCode CONFLICTING_MODIFIERS = _CONFLICTING_MODIFIERS;
-
-  static const ParserErrorCode CONST_AND_FINAL = _CONST_AND_FINAL;
-
-  static const ParserErrorCode CONST_CLASS = _CONST_CLASS;
-
-  static const ParserErrorCode CONST_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-      'CONST_CONSTRUCTOR_WITH_BODY', "Const constructors can't have a body.",
-      correction: "Try removing either the 'const' keyword or the body.");
-
-  static const ParserErrorCode CONST_ENUM = ParserErrorCode(
-      'CONST_ENUM', "Enums can't be declared to be 'const'.",
-      correction: "Try removing the 'const' keyword.");
-
-  static const ParserErrorCode CONST_FACTORY = _CONST_FACTORY;
-
-  static const ParserErrorCode CONST_METHOD = _CONST_METHOD;
-
-  static const ParserErrorCode CONST_TYPEDEF = ParserErrorCode(
-      'CONST_TYPEDEF', "Type aliases can't be declared to be 'const'.",
-      correction: "Try removing the 'const' keyword.");
-
-  static const ParserErrorCode CONSTRUCTOR_WITH_RETURN_TYPE =
-      _CONSTRUCTOR_WITH_RETURN_TYPE;
-
-  static const ParserErrorCode CONSTRUCTOR_WITH_TYPE_ARGUMENTS =
-      _CONSTRUCTOR_WITH_TYPE_ARGUMENTS;
-
-  static const ParserErrorCode CONTINUE_OUTSIDE_OF_LOOP =
-      _CONTINUE_OUTSIDE_OF_LOOP;
-
-  static const ParserErrorCode CONTINUE_WITHOUT_LABEL_IN_CASE =
-      _CONTINUE_WITHOUT_LABEL_IN_CASE;
-
-  static const ParserErrorCode COVARIANT_AND_STATIC = _COVARIANT_AND_STATIC;
-
-  static const ParserErrorCode COVARIANT_CONSTRUCTOR = ParserErrorCode(
-      'COVARIANT_CONSTRUCTOR',
-      "A constructor can't be declared to be 'covariant'.",
-      correction: "Try removing the keyword 'covariant'.");
-
-  static const ParserErrorCode COVARIANT_MEMBER = _COVARIANT_MEMBER;
-
-  static const ParserErrorCode COVARIANT_TOP_LEVEL_DECLARATION =
-      ParserErrorCode('COVARIANT_TOP_LEVEL_DECLARATION',
-          "Top-level declarations can't be declared to be covariant.",
-          correction: "Try removing the keyword 'covariant'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a function type associated with
-  // a parameter includes optional parameters that have a default value. This
-  // isn't allowed because the default values of parameters aren't part of the
-  // function's type, and therefore including them doesn't provide any value.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the parameter `p` has a
-  // default value even though it's part of the type of the parameter `g`:
-  //
-  // ```dart
-  // void f(void Function([int p [!=!] 0]) g) {
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the default value from the function-type's parameter:
-  //
-  // ```dart
-  // void f(void Function([int p]) g) {
-  // }
-  // ```
-  static const ParserErrorCode DEFAULT_VALUE_IN_FUNCTION_TYPE = ParserErrorCode(
-      'DEFAULT_VALUE_IN_FUNCTION_TYPE',
-      "Parameters in a function type can't have default values.",
-      correction: "Try removing the default value.",
-      hasPublishedDocs: true);
-
-  static const ParserErrorCode DEFERRED_AFTER_PREFIX = _DEFERRED_AFTER_PREFIX;
-
-  static const ParserErrorCode DIRECTIVE_AFTER_DECLARATION =
-      _DIRECTIVE_AFTER_DECLARATION;
-
-  static const ParserErrorCode DUPLICATE_DEFERRED = _DUPLICATE_DEFERRED;
-
-  /**
-   * Parameters:
-   * 0: the label that was duplicated
-   */
-  static const ParserErrorCode DUPLICATE_LABEL_IN_SWITCH_STATEMENT =
-      _DUPLICATE_LABEL_IN_SWITCH_STATEMENT;
-
-  static const ParserErrorCode DUPLICATE_PREFIX = _DUPLICATE_PREFIX;
-
-  /**
-   * Parameters:
-   * 0: the modifier that was duplicated
-   */
-  static const ParserErrorCode DUPLICATED_MODIFIER = _DUPLICATED_MODIFIER;
-
-  static const ParserErrorCode EMPTY_ENUM_BODY = ParserErrorCode(
-      'EMPTY_ENUM_BODY', "An enum must declare at least one constant name.",
-      correction: "Try declaring a constant.");
-
-  static const ParserErrorCode ENUM_IN_CLASS = _ENUM_IN_CLASS;
-
-  static const ParserErrorCode EQUALITY_CANNOT_BE_EQUALITY_OPERAND =
-      _EQUALITY_CANNOT_BE_EQUALITY_OPERAND;
-
-  static const ParserErrorCode EXPECTED_BODY = _EXPECTED_BODY;
-
-  static const ParserErrorCode EXPECTED_CASE_OR_DEFAULT = ParserErrorCode(
-      'EXPECTED_CASE_OR_DEFAULT', "Expected 'case' or 'default'.",
-      correction: "Try placing this code inside a case clause.");
-
-  static const ParserErrorCode EXPECTED_CLASS_MEMBER = ParserErrorCode(
-      'EXPECTED_CLASS_MEMBER', "Expected a class member.",
-      correction: "Try placing this code inside a class member.");
-
-  static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
-
-  static const ParserErrorCode EXPECTED_EXECUTABLE = ParserErrorCode(
-      'EXPECTED_EXECUTABLE',
-      "Expected a method, getter, setter or operator declaration.",
-      correction:
-          "This appears to be incomplete code. Try removing it or completing it.");
-
-  static const ParserErrorCode EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD =
-      _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD;
-
-  static const ParserErrorCode EXPECTED_INSTEAD = _EXPECTED_INSTEAD;
-
-  static const ParserErrorCode EXPECTED_LIST_OR_MAP_LITERAL = ParserErrorCode(
-      'EXPECTED_LIST_OR_MAP_LITERAL', "Expected a list or map literal.",
-      correction:
-          "Try inserting a list or map literal, or remove the type arguments.");
-
-  static const ParserErrorCode EXPECTED_STRING_LITERAL =
-      ParserErrorCode('EXPECTED_STRING_LITERAL', "Expected a string literal.");
-
-  /**
-   * Parameters:
-   * 0: the token that was expected but not found
-   */
-  static const ParserErrorCode EXPECTED_TOKEN =
-      ParserErrorCode('EXPECTED_TOKEN', "Expected to find '{0}'.");
-
-  static const ParserErrorCode EXPECTED_TYPE_NAME =
-      ParserErrorCode('EXPECTED_TYPE_NAME', "Expected a type name.");
-
-  static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
-
-  static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
-      _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an abstract declaration is
-  // declared in an extension. Extensions can declare only concrete members.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the method `a` doesn't
-  // have a body:
-  //
-  // ```dart
-  // extension E on String {
-  //   int [!a!]();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either provide an implementation for the member or remove it.
-  static const ParserErrorCode EXTENSION_DECLARES_ABSTRACT_MEMBER =
-      _EXTENSION_DECLARES_ABSTRACT_MEMBER;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor declaration is
-  // found in an extension. It isn't valid to define a constructor because
-  // extensions aren't classes, and it isn't possible to create an instance of
-  // an extension.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there is a constructor
-  // declaration in `E`:
-  //
-  // ```dart
-  // extension E on String {
-  //   [!E!]() : super();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the constructor or replace it with a static method.
-  static const ParserErrorCode EXTENSION_DECLARES_CONSTRUCTOR =
-      _EXTENSION_DECLARES_CONSTRUCTOR;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance field declaration is
-  // found in an extension. It isn't valid to define an instance field because
-  // extensions can only add behavior, not state.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `s` is an instance
-  // field:
-  //
-  // ```dart
-  // %language=2.9
-  // extension E on String {
-  //   String [!s!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the field, make it a static field, or convert it to be a getter,
-  // setter, or method.
-  static const ParserErrorCode EXTENSION_DECLARES_INSTANCE_FIELD =
-      _EXTENSION_DECLARES_INSTANCE_FIELD;
-
-  static const ParserErrorCode EXTERNAL_CLASS = _EXTERNAL_CLASS;
-
-  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_BODY =
-      _EXTERNAL_CONSTRUCTOR_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER =
-      _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER;
-
-  static const ParserErrorCode EXTERNAL_ENUM = _EXTERNAL_ENUM;
-
-  static const ParserErrorCode EXTERNAL_FACTORY_REDIRECTION =
-      _EXTERNAL_FACTORY_REDIRECTION;
-
-  static const ParserErrorCode EXTERNAL_FACTORY_WITH_BODY =
-      _EXTERNAL_FACTORY_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_FIELD = _EXTERNAL_FIELD;
-
-  static const ParserErrorCode EXTERNAL_GETTER_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_GETTER_WITH_BODY', "External getters can't have a body.",
-      correction: "Try removing the body of the getter, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_LATE_FIELD = _EXTERNAL_LATE_FIELD;
-
-  static const ParserErrorCode EXTERNAL_METHOD_WITH_BODY =
-      _EXTERNAL_METHOD_WITH_BODY;
-
-  static const ParserErrorCode EXTERNAL_OPERATOR_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_OPERATOR_WITH_BODY', "External operators can't have a body.",
-      correction: "Try removing the body of the operator, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_SETTER_WITH_BODY = ParserErrorCode(
-      'EXTERNAL_SETTER_WITH_BODY', "External setters can't have a body.",
-      correction: "Try removing the body of the setter, or "
-          "removing the keyword 'external'.");
-
-  static const ParserErrorCode EXTERNAL_TYPEDEF = _EXTERNAL_TYPEDEF;
-
-  static const ParserErrorCode EXTRANEOUS_MODIFIER = _EXTRANEOUS_MODIFIER;
-
-  static const ParserErrorCode FACTORY_TOP_LEVEL_DECLARATION =
-      _FACTORY_TOP_LEVEL_DECLARATION;
-
-  static const ParserErrorCode FACTORY_WITH_INITIALIZERS = ParserErrorCode(
-      'FACTORY_WITH_INITIALIZERS',
-      "A 'factory' constructor can't have initializers.",
-      correction:
-          "Try removing the 'factory' keyword to make this a generative constructor, or "
-          "removing the initializers.");
-
-  static const ParserErrorCode FACTORY_WITHOUT_BODY = ParserErrorCode(
-      'FACTORY_WITHOUT_BODY',
-      "A non-redirecting 'factory' constructor must have a body.",
-      correction: "Try adding a body to the constructor.");
-
-  static const ParserErrorCode FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
-      _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS;
-
-  static const ParserErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
-      _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR;
-
-  static const ParserErrorCode FINAL_AND_COVARIANT = _FINAL_AND_COVARIANT;
-
-  static const ParserErrorCode FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
-      _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER;
-
-  static const ParserErrorCode FINAL_AND_VAR = _FINAL_AND_VAR;
-
-  static const ParserErrorCode FINAL_CLASS = ParserErrorCode(
-      'FINAL_CLASS', "Classes can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_CONSTRUCTOR = ParserErrorCode(
-      'FINAL_CONSTRUCTOR', "A constructor can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_ENUM = ParserErrorCode(
-      'FINAL_ENUM', "Enums can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_METHOD = ParserErrorCode('FINAL_METHOD',
-      "Getters, setters and methods can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FINAL_TYPEDEF = ParserErrorCode(
-      'FINAL_TYPEDEF', "Typedefs can't be declared to be 'final'.",
-      correction: "Try removing the keyword 'final'.");
-
-  static const ParserErrorCode FUNCTION_TYPED_PARAMETER_VAR = ParserErrorCode(
-      'FUNCTION_TYPED_PARAMETER_VAR',
-      "Function-typed parameters can't specify 'const', 'final' or 'var' in place of a return type.",
-      correction: "Try replacing the keyword with a return type.");
-
-  static const ParserErrorCode GETTER_CONSTRUCTOR = _GETTER_CONSTRUCTOR;
-
-  static const ParserErrorCode GETTER_IN_FUNCTION = ParserErrorCode(
-      'GETTER_IN_FUNCTION',
-      "Getters can't be defined within methods or functions.",
-      correction: "Try moving the getter outside the method or function, or "
-          "converting the getter to a function.");
-
-  static const ParserErrorCode GETTER_WITH_PARAMETERS = ParserErrorCode(
-      'GETTER_WITH_PARAMETERS',
-      "Getters must be declared without a parameter list.",
-      correction: "Try removing the parameter list, or "
-          "removing the keyword 'get' to define a method rather than a getter.");
-
-  static const ParserErrorCode ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE =
-      _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_EXTENDS =
-      _IMPLEMENTS_BEFORE_EXTENDS;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_ON = _IMPLEMENTS_BEFORE_ON;
-
-  static const ParserErrorCode IMPLEMENTS_BEFORE_WITH = _IMPLEMENTS_BEFORE_WITH;
-
-  static const ParserErrorCode IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
-      _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
-
-  static const ParserErrorCode INITIALIZED_VARIABLE_IN_FOR_EACH =
-      _INITIALIZED_VARIABLE_IN_FOR_EACH;
-
-  static const ParserErrorCode INVALID_AWAIT_IN_FOR = _INVALID_AWAIT_IN_FOR;
-
-  /**
-   * Parameters:
-   * 0: the invalid escape sequence
-   */
-  static const ParserErrorCode INVALID_CODE_POINT = ParserErrorCode(
-      'INVALID_CODE_POINT',
-      "The escape sequence '{0}' isn't a valid code point.");
-
-  static const ParserErrorCode INVALID_COMMENT_REFERENCE = ParserErrorCode(
-      'INVALID_COMMENT_REFERENCE',
-      "Comment references should contain a possibly prefixed identifier and "
-          "can start with 'new', but shouldn't contain anything else.");
-
-  static const ParserErrorCode INVALID_CONSTRUCTOR_NAME =
-      _INVALID_CONSTRUCTOR_NAME;
-
-  static const ParserErrorCode INVALID_GENERIC_FUNCTION_TYPE = ParserErrorCode(
-      'INVALID_GENERIC_FUNCTION_TYPE', "Invalid generic function type.",
-      correction:
-          "Try using a generic function type (returnType 'Function(' parameters ')').");
-
-  static const ParserErrorCode INVALID_HEX_ESCAPE = _INVALID_HEX_ESCAPE;
-
-  static const ParserErrorCode INVALID_INITIALIZER = _INVALID_INITIALIZER;
-
-  static const ParserErrorCode INVALID_LITERAL_IN_CONFIGURATION =
-      ParserErrorCode('INVALID_LITERAL_IN_CONFIGURATION',
-          "The literal in a configuration can't contain interpolation.",
-          correction: "Try removing the interpolation expressions.");
-
-  /**
-   * Parameters:
-   * 0: the operator that is invalid
-   */
-  static const ParserErrorCode INVALID_OPERATOR = _INVALID_OPERATOR;
-
-  /**
-   * Parameters:
-   * 0: the operator being applied to 'super'
-   *
-   * Only generated by the old parser.
-   * Replaced by INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER.
-   */
-  static const ParserErrorCode INVALID_OPERATOR_FOR_SUPER = ParserErrorCode(
-      'INVALID_OPERATOR_FOR_SUPER',
-      "The operator '{0}' can't be used with 'super'.");
-
-  static const ParserErrorCode INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
-      _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER;
-
-  static const ParserErrorCode INVALID_STAR_AFTER_ASYNC = ParserErrorCode(
-      'INVALID_STAR_AFTER_ASYNC',
-      "The modifier 'async*' isn't allowed for an expression function body.",
-      correction: "Try converting the body to a block.");
-
-  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
-      _INVALID_SUPER_IN_INITIALIZER;
-
-  static const ParserErrorCode INVALID_SYNC = ParserErrorCode('INVALID_SYNC',
-      "The modifier 'sync' isn't allowed for an expression function body.",
-      correction: "Try converting the body to a block.");
-
-  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
-      _INVALID_THIS_IN_INITIALIZER;
-
-  static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a member declared inside an
-  // extension uses the keyword `covariant` in the declaration of a parameter.
-  // Extensions aren't classes and don't have subclasses, so the keyword serves
-  // no purpose.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` is marked as being
-  // covariant:
-  //
-  // ```dart
-  // extension E on String {
-  //   void a([!covariant!] int i) {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the `covariant` keyword:
-  //
-  // ```dart
-  // extension E on String {
-  //   void a(int i) {}
-  // }
-  // ```
-  static const ParserErrorCode INVALID_USE_OF_COVARIANT_IN_EXTENSION =
-      _INVALID_USE_OF_COVARIANT_IN_EXTENSION;
-
-  static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
-      _LIBRARY_DIRECTIVE_NOT_FIRST;
-
-  static const ParserErrorCode LITERAL_WITH_CLASS_AND_NEW =
-      _LITERAL_WITH_CLASS_AND_NEW;
-
-  static const ParserErrorCode LITERAL_WITH_CLASS = _LITERAL_WITH_CLASS;
-
-  static const ParserErrorCode LITERAL_WITH_NEW = _LITERAL_WITH_NEW;
-
-  static const ParserErrorCode LOCAL_FUNCTION_DECLARATION_MODIFIER =
-      ParserErrorCode('LOCAL_FUNCTION_DECLARATION_MODIFIER',
-          "Local function declarations can't specify any modifiers.",
-          correction: "Try removing the modifier.");
-
-  static const ParserErrorCode MEMBER_WITH_CLASS_NAME = _MEMBER_WITH_CLASS_NAME;
-
-  static const ParserErrorCode MISSING_ASSIGNABLE_SELECTOR =
-      _MISSING_ASSIGNABLE_SELECTOR;
-
-  static const ParserErrorCode MISSING_ASSIGNMENT_IN_INITIALIZER =
-      _MISSING_ASSIGNMENT_IN_INITIALIZER;
-
-  static const ParserErrorCode MISSING_CATCH_OR_FINALLY =
-      _MISSING_CATCH_OR_FINALLY;
-
-  static const ParserErrorCode MISSING_CLOSING_PARENTHESIS = ParserErrorCode(
-      'MISSING_CLOSING_PARENTHESIS', "The closing parenthesis is missing.",
-      correction: "Try adding the closing parenthesis.");
-
-  static const ParserErrorCode MISSING_CONST_FINAL_VAR_OR_TYPE =
-      _MISSING_CONST_FINAL_VAR_OR_TYPE;
-
-  static const ParserErrorCode MISSING_ENUM_BODY = ParserErrorCode(
-      'MISSING_ENUM_BODY',
-      "An enum definition must have a body with at least one constant name.",
-      correction: "Try adding a body and defining at least one constant.");
-
-  static const ParserErrorCode MISSING_EXPRESSION_IN_INITIALIZER =
-      ParserErrorCode('MISSING_EXPRESSION_IN_INITIALIZER',
-          "Expected an expression after the assignment operator.",
-          correction: "Try adding the value to be assigned, or "
-              "remove the assignment operator.");
-
-  static const ParserErrorCode MISSING_EXPRESSION_IN_THROW =
-      _MISSING_EXPRESSION_IN_THROW;
-
-  static const ParserErrorCode MISSING_FUNCTION_BODY = ParserErrorCode(
-      'MISSING_FUNCTION_BODY', "A function body must be provided.",
-      correction: "Try adding a function body.");
-
-  static const ParserErrorCode MISSING_FUNCTION_KEYWORD = ParserErrorCode(
-      'MISSING_FUNCTION_KEYWORD',
-      "Function types must have the keyword 'Function' before the parameter list.",
-      correction: "Try adding the keyword 'Function'.");
-
-  static const ParserErrorCode MISSING_FUNCTION_PARAMETERS = ParserErrorCode(
-      'MISSING_FUNCTION_PARAMETERS',
-      "Functions must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_GET = ParserErrorCode('MISSING_GET',
-      "Getters must have the keyword 'get' before the getter name.",
-      correction: "Try adding the keyword 'get'.");
-
-  static const ParserErrorCode MISSING_IDENTIFIER =
-      ParserErrorCode('MISSING_IDENTIFIER', "Expected an identifier.");
-
-  static const ParserErrorCode MISSING_INITIALIZER = _MISSING_INITIALIZER;
-
-  static const ParserErrorCode MISSING_KEYWORD_OPERATOR =
-      _MISSING_KEYWORD_OPERATOR;
-
-  static const ParserErrorCode MISSING_METHOD_PARAMETERS = ParserErrorCode(
-      'MISSING_METHOD_PARAMETERS',
-      "Methods must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_NAME_FOR_NAMED_PARAMETER = ParserErrorCode(
-      'MISSING_NAME_FOR_NAMED_PARAMETER',
-      "Named parameters in a function type must have a name",
-      correction:
-          "Try providing a name for the parameter or removing the curly braces.");
-
-  static const ParserErrorCode MISSING_NAME_IN_LIBRARY_DIRECTIVE = ParserErrorCode(
-      'MISSING_NAME_IN_LIBRARY_DIRECTIVE',
-      "Library directives must include a library name.",
-      correction: "Try adding a library name after the keyword 'library', or "
-          "remove the library directive if the library doesn't have any parts.");
-
-  static const ParserErrorCode MISSING_NAME_IN_PART_OF_DIRECTIVE =
-      ParserErrorCode('MISSING_NAME_IN_PART_OF_DIRECTIVE',
-          "Part-of directives must include a library name.",
-          correction: "Try adding a library name after the 'of'.");
-
-  static const ParserErrorCode MISSING_PREFIX_IN_DEFERRED_IMPORT =
-      _MISSING_PREFIX_IN_DEFERRED_IMPORT;
-
-  static const ParserErrorCode MISSING_STAR_AFTER_SYNC = ParserErrorCode(
-      'MISSING_STAR_AFTER_SYNC',
-      "The modifier 'sync' must be followed by a star ('*').",
-      correction: "Try removing the modifier, or add a star.");
-
-  static const ParserErrorCode MISSING_STATEMENT = _MISSING_STATEMENT;
-
-  /**
-   * Parameters:
-   * 0: the terminator that is missing
-   */
-  static const ParserErrorCode MISSING_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('MISSING_TERMINATOR_FOR_PARAMETER_GROUP',
-          "There is no '{0}' to close the parameter group.",
-          correction: "Try inserting a '{0}' at the end of the group.");
-
-  static const ParserErrorCode MISSING_TYPEDEF_PARAMETERS = ParserErrorCode(
-      'MISSING_TYPEDEF_PARAMETERS',
-      "Typedefs must have an explicit list of parameters.",
-      correction: "Try adding a parameter list.");
-
-  static const ParserErrorCode MISSING_VARIABLE_IN_FOR_EACH = ParserErrorCode(
-      'MISSING_VARIABLE_IN_FOR_EACH',
-      "A loop variable must be declared in a for-each loop before the 'in', but none was found.",
-      correction: "Try declaring a loop variable.");
-
-  static const ParserErrorCode MIXED_PARAMETER_GROUPS = ParserErrorCode(
-      'MIXED_PARAMETER_GROUPS',
-      "Can't have both positional and named parameters in a single parameter list.",
-      correction: "Try choosing a single style of optional parameters.");
-
-  static const ParserErrorCode MIXIN_DECLARES_CONSTRUCTOR =
-      _MIXIN_DECLARES_CONSTRUCTOR;
-
-  static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
-
-  static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
-      _MULTIPLE_EXTENDS_CLAUSES;
-
-  static const ParserErrorCode MULTIPLE_IMPLEMENTS_CLAUSES = ParserErrorCode(
-      'MULTIPLE_IMPLEMENTS_CLAUSES',
-      "Each class or mixin definition can have at most one implements clause.",
-      correction:
-          "Try combining all of the implements clauses into a single clause.");
-
-  static const ParserErrorCode MULTIPLE_LIBRARY_DIRECTIVES =
-      _MULTIPLE_LIBRARY_DIRECTIVES;
-
-  static const ParserErrorCode MULTIPLE_NAMED_PARAMETER_GROUPS = ParserErrorCode(
-      'MULTIPLE_NAMED_PARAMETER_GROUPS',
-      "Can't have multiple groups of named parameters in a single parameter list.",
-      correction: "Try combining all of the groups into a single group.");
-
-  static const ParserErrorCode MULTIPLE_ON_CLAUSES = _MULTIPLE_ON_CLAUSES;
-
-  static const ParserErrorCode MULTIPLE_PART_OF_DIRECTIVES =
-      _MULTIPLE_PART_OF_DIRECTIVES;
-
-  static const ParserErrorCode MULTIPLE_POSITIONAL_PARAMETER_GROUPS =
-      ParserErrorCode('MULTIPLE_POSITIONAL_PARAMETER_GROUPS',
-          "Can't have multiple groups of positional parameters in a single parameter list.",
-          correction: "Try combining all of the groups into a single group.");
-
-  /**
-   * Parameters:
-   * 0: the number of variables being declared
-   */
-  static const ParserErrorCode MULTIPLE_VARIABLES_IN_FOR_EACH = ParserErrorCode(
-      'MULTIPLE_VARIABLES_IN_FOR_EACH',
-      "A single loop variable must be declared in a for-each loop before "
-          "the 'in', but {0} were found.",
-      correction:
-          "Try moving all but one of the declarations inside the loop body.");
-
-  static const ParserErrorCode MULTIPLE_VARIANCE_MODIFIERS =
-      _MULTIPLE_VARIANCE_MODIFIERS;
-
-  static const ParserErrorCode MULTIPLE_WITH_CLAUSES = _MULTIPLE_WITH_CLAUSES;
-
-  static const ParserErrorCode NAMED_FUNCTION_EXPRESSION = ParserErrorCode(
-      'NAMED_FUNCTION_EXPRESSION', "Function expressions can't be named.",
-      correction: "Try removing the name, or "
-          "moving the function expression to a function declaration statement.");
-
-  static const ParserErrorCode NAMED_FUNCTION_TYPE = ParserErrorCode(
-      'NAMED_FUNCTION_TYPE', "Function types can't be named.",
-      correction: "Try replacing the name with the keyword 'Function'.");
-
-  static const ParserErrorCode NAMED_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
-      'NAMED_PARAMETER_OUTSIDE_GROUP',
-      "Named parameters must be enclosed in curly braces ('{' and '}').",
-      correction: "Try surrounding the named parameters in curly braces.");
-
-  static const ParserErrorCode NATIVE_CLAUSE_IN_NON_SDK_CODE = ParserErrorCode(
-      'NATIVE_CLAUSE_IN_NON_SDK_CODE',
-      "Native clause can only be used in the SDK and code that is loaded "
-          "through native extensions.",
-      correction: "Try removing the native clause.");
-
-  static const ParserErrorCode NATIVE_CLAUSE_SHOULD_BE_ANNOTATION =
-      _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION;
-
-  static const ParserErrorCode NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE =
-      ParserErrorCode(
-          'NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE',
-          "Native functions can only be declared in the SDK and code that is "
-              "loaded through native extensions.",
-          correction: "Try removing the word 'native'.");
-
-  static const ParserErrorCode NON_CONSTRUCTOR_FACTORY = ParserErrorCode(
-      'NON_CONSTRUCTOR_FACTORY',
-      "Only a constructor can be declared to be a factory.",
-      correction: "Try removing the keyword 'factory'.");
-
-  static const ParserErrorCode NON_IDENTIFIER_LIBRARY_NAME = ParserErrorCode(
-      'NON_IDENTIFIER_LIBRARY_NAME',
-      "The name of a library must be an identifier.",
-      correction: "Try using an identifier as the name of the library.");
-
-  static const ParserErrorCode NON_PART_OF_DIRECTIVE_IN_PART = ParserErrorCode(
-      'NON_PART_OF_DIRECTIVE_IN_PART',
-      "The part-of directive must be the only directive in a part.",
-      correction: "Try removing the other directives, or "
-          "moving them to the library for which this is a part.");
-
-  static const ParserErrorCode NON_STRING_LITERAL_AS_URI = ParserErrorCode(
-      'NON_STRING_LITERAL_AS_URI', "The URI must be a string literal.",
-      correction: "Try enclosing the URI in either single or double quotes.");
-
-  /**
-   * Parameters:
-   * 0: the operator that the user is trying to define
-   */
-  static const ParserErrorCode NON_USER_DEFINABLE_OPERATOR = ParserErrorCode(
-      'NON_USER_DEFINABLE_OPERATOR',
-      "The operator '{0}' isn't user definable.");
-
-  static const ParserErrorCode NORMAL_BEFORE_OPTIONAL_PARAMETERS = ParserErrorCode(
-      'NORMAL_BEFORE_OPTIONAL_PARAMETERS',
-      "Normal parameters must occur before optional parameters.",
-      correction:
-          "Try moving all of the normal parameters before the optional parameters.");
-
-  static const ErrorCode NULL_AWARE_CASCADE_OUT_OF_ORDER =
-      _NULL_AWARE_CASCADE_OUT_OF_ORDER;
-
-  static const ParserErrorCode POSITIONAL_AFTER_NAMED_ARGUMENT = ParserErrorCode(
-      'POSITIONAL_AFTER_NAMED_ARGUMENT',
-      "Positional arguments must occur before named arguments.",
-      correction:
-          "Try moving all of the positional arguments before the named arguments.");
-
-  static const ParserErrorCode POSITIONAL_PARAMETER_OUTSIDE_GROUP = ParserErrorCode(
-      'POSITIONAL_PARAMETER_OUTSIDE_GROUP',
-      "Positional parameters must be enclosed in square brackets ('[' and ']').",
-      correction:
-          "Try surrounding the positional parameters in square brackets.");
-
-  static const ParserErrorCode PREFIX_AFTER_COMBINATOR =
-      _PREFIX_AFTER_COMBINATOR;
-
-  static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY =
-      _REDIRECTING_CONSTRUCTOR_WITH_BODY;
-
-  static const ParserErrorCode REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR =
-      _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR;
-
-  static const ParserErrorCode SETTER_CONSTRUCTOR = _SETTER_CONSTRUCTOR;
-
-  static const ParserErrorCode SETTER_IN_FUNCTION = ParserErrorCode(
-      'SETTER_IN_FUNCTION',
-      "Setters can't be defined within methods or functions.",
-      correction: "Try moving the setter outside the method or function.");
-
-  static const ParserErrorCode STACK_OVERFLOW = _STACK_OVERFLOW;
-
-  static const ParserErrorCode STATIC_CONSTRUCTOR = _STATIC_CONSTRUCTOR;
-
-  static const ParserErrorCode STATIC_GETTER_WITHOUT_BODY = ParserErrorCode(
-      'STATIC_GETTER_WITHOUT_BODY', "A 'static' getter must have a body.",
-      correction:
-          "Try adding a body to the getter, or removing the keyword 'static'.");
-
-  static const ParserErrorCode STATIC_OPERATOR = _STATIC_OPERATOR;
-
-  static const ParserErrorCode STATIC_SETTER_WITHOUT_BODY = ParserErrorCode(
-      'STATIC_SETTER_WITHOUT_BODY', "A 'static' setter must have a body.",
-      correction:
-          "Try adding a body to the setter, or removing the keyword 'static'.");
-
-  static const ParserErrorCode STATIC_TOP_LEVEL_DECLARATION = ParserErrorCode(
-      'STATIC_TOP_LEVEL_DECLARATION',
-      "Top-level declarations can't be declared to be static.",
-      correction: "Try removing the keyword 'static'.");
-
-  static const ParserErrorCode SWITCH_HAS_CASE_AFTER_DEFAULT_CASE =
-      _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE;
-
-  static const ParserErrorCode SWITCH_HAS_MULTIPLE_DEFAULT_CASES =
-      _SWITCH_HAS_MULTIPLE_DEFAULT_CASES;
-
-  static const ParserErrorCode TOP_LEVEL_OPERATOR = _TOP_LEVEL_OPERATOR;
-
-  static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
-      _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
-
-  static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
-
-  static const ParserErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
-      _TYPE_PARAMETER_ON_CONSTRUCTOR;
-
-  /**
-   * 7.1.1 Operators: Type parameters are not syntactically supported on an
-   * operator.
-   */
-  static const ParserErrorCode TYPE_PARAMETER_ON_OPERATOR = ParserErrorCode(
-      'TYPE_PARAMETER_ON_OPERATOR',
-      "Types parameters aren't allowed when defining an operator.",
-      correction: "Try removing the type parameters.");
-
-  static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
-
-  /**
-   * Parameters:
-   * 0: the starting character that was missing
-   */
-  static const ParserErrorCode UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP',
-          "There is no '{0}' to open a parameter group.",
-          correction: "Try inserting the '{0}' at the appropriate location.");
-
-  /**
-   * Parameters:
-   * 0: the unexpected text that was found
-   */
-  static const ParserErrorCode UNEXPECTED_TOKEN = ParserErrorCode(
-      'UNEXPECTED_TOKEN', "Unexpected text '{0}'.",
-      correction: "Try removing the text.");
-
-  static const ParserErrorCode VAR_AND_TYPE = _VAR_AND_TYPE;
-
-  static const ParserErrorCode VAR_AS_TYPE_NAME = _VAR_AS_TYPE_NAME;
-
-  static const ParserErrorCode VAR_CLASS = ParserErrorCode(
-      'VAR_CLASS', "Classes can't be declared to be 'var'.",
-      correction: "Try removing the keyword 'var'.");
-
-  static const ParserErrorCode VAR_ENUM = ParserErrorCode(
-      'VAR_ENUM', "Enums can't be declared to be 'var'.",
-      correction: "Try removing the keyword 'var'.");
-
-  static const ParserErrorCode VAR_RETURN_TYPE = _VAR_RETURN_TYPE;
-
-  static const ParserErrorCode VAR_TYPEDEF =
-      ParserErrorCode('VAR_TYPEDEF', "Typedefs can't be declared to be 'var'.",
-          correction: "Try removing the keyword 'var', or "
-              "replacing it with the name of the return type.");
-
-  static const ParserErrorCode VOID_WITH_TYPE_ARGUMENTS =
-      _VOID_WITH_TYPE_ARGUMENTS;
-
-  static const ParserErrorCode WITH_BEFORE_EXTENDS = _WITH_BEFORE_EXTENDS;
-
-  static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
-      ParserErrorCode('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
-          "The default value of a positional parameter should be preceded by '='.",
-          correction: "Try replacing the ':' with '='.");
-
-  /**
-   * Parameters:
-   * 0: the terminator that was expected
-   * 1: the terminator that was found
-   */
-  static const ParserErrorCode WRONG_TERMINATOR_FOR_PARAMETER_GROUP =
-      ParserErrorCode('WRONG_TERMINATOR_FOR_PARAMETER_GROUP',
-          "Expected '{0}' to close parameter group.",
-          correction: "Try replacing '{0}' with '{1}'.");
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const ParserErrorCode(
-    String name,
-    String message, {
-    String? correction,
-    bool hasPublishedDocs = false,
-    String? uniqueName,
-  }) : super(
-          correction: correction,
-          hasPublishedDocs: hasPublishedDocs,
-          message: message,
-          name: name,
-          uniqueName: uniqueName ?? 'ParserErrorCode.$name',
-        );
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.SYNTACTIC_ERROR;
-}
+export 'package:analyzer/src/dart/error/syntactic_errors.analyzer.g.dart';
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index ed43512..4db09fe 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -4,7 +4,7 @@
 // Instead modify 'pkg/front_end/messages.yaml' and run
 // 'dart pkg/analyzer/tool/messages/generate.dart' to update.
 
-part of 'syntactic_errors.dart';
+part of 'syntactic_errors.analyzer.g.dart';
 
 final fastaAnalyzerErrorCodes = <ErrorCode?>[
   null,
@@ -129,554 +129,723 @@
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = ParserErrorCode(
-    'ABSTRACT_CLASS_MEMBER',
-    "Members of classes can't be declared to be 'abstract'.",
-    correction:
-        "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.");
+  'ABSTRACT_CLASS_MEMBER',
+  "Members of classes can't be declared to be 'abstract'.",
+  correction:
+      "Try removing the 'abstract' keyword. You can add the 'abstract' keyword before the class declaration.",
+);
 
 const ParserErrorCode _ABSTRACT_EXTERNAL_FIELD = ParserErrorCode(
-    'ABSTRACT_EXTERNAL_FIELD',
-    "Fields can't be declared both 'abstract' and 'external'.",
-    correction: "Try removing the 'abstract' or 'external' keyword.");
+  'ABSTRACT_EXTERNAL_FIELD',
+  "Fields can't be declared both 'abstract' and 'external'.",
+  correction: "Try removing the 'abstract' or 'external' keyword.",
+);
 
 const ParserErrorCode _ABSTRACT_LATE_FIELD = ParserErrorCode(
-    'ABSTRACT_LATE_FIELD', "Abstract fields cannot be late.",
-    correction: "Try removing the 'abstract' or 'late' keyword.");
+  'ABSTRACT_LATE_FIELD',
+  "Abstract fields cannot be late.",
+  correction: "Try removing the 'abstract' or 'late' keyword.",
+);
 
 const ParserErrorCode _ABSTRACT_STATIC_FIELD = ParserErrorCode(
-    'ABSTRACT_STATIC_FIELD', "Static fields can't be declared 'abstract'.",
-    correction: "Try removing the 'abstract' or 'static' keyword.");
+  'ABSTRACT_STATIC_FIELD',
+  "Static fields can't be declared 'abstract'.",
+  correction: "Try removing the 'abstract' or 'static' keyword.",
+);
 
 const ParserErrorCode _ANNOTATION_ON_TYPE_ARGUMENT = ParserErrorCode(
-    'ANNOTATION_ON_TYPE_ARGUMENT',
-    "Type arguments can't have annotations because they aren't declarations.");
+  'ANNOTATION_ON_TYPE_ARGUMENT',
+  "Type arguments can't have annotations because they aren't declarations.",
+);
 
 const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS = ParserErrorCode(
-    'ANNOTATION_WITH_TYPE_ARGUMENTS',
-    "An annotation can't use type arguments.");
+  'ANNOTATION_WITH_TYPE_ARGUMENTS',
+  "An annotation can't use type arguments.",
+);
 
 const ParserErrorCode _ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED =
-    ParserErrorCode('ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
-        "An annotation with type arguments must be followed by an argument list.");
+    ParserErrorCode(
+  'ANNOTATION_WITH_TYPE_ARGUMENTS_UNINSTANTIATED',
+  "An annotation with type arguments must be followed by an argument list.",
+);
 
 const ParserErrorCode _BINARY_OPERATOR_WRITTEN_OUT = ParserErrorCode(
-    'BINARY_OPERATOR_WRITTEN_OUT',
-    "Binary operator '{0}' is written as '{1}' instead of the written out word.",
-    correction: "Try replacing '{0}' with '{1}'.");
+  'BINARY_OPERATOR_WRITTEN_OUT',
+  "Binary operator '{0}' is written as '{1}' instead of the written out word.",
+  correction: "Try replacing '{0}' with '{1}'.",
+);
 
 const ParserErrorCode _BREAK_OUTSIDE_OF_LOOP = ParserErrorCode(
-    'BREAK_OUTSIDE_OF_LOOP',
-    "A break statement can't be used outside of a loop or switch statement.",
-    correction: "Try removing the break statement.");
+  'BREAK_OUTSIDE_OF_LOOP',
+  "A break statement can't be used outside of a loop or switch statement.",
+  correction: "Try removing the break statement.",
+);
 
-const ParserErrorCode _CATCH_SYNTAX = ParserErrorCode('CATCH_SYNTAX',
-    "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
-    correction:
-        "No types are needed, the first is given by 'on', the second is always 'StackTrace'.");
+const ParserErrorCode _CATCH_SYNTAX = ParserErrorCode(
+  'CATCH_SYNTAX',
+  "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+  correction:
+      "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+);
 
 const ParserErrorCode _CATCH_SYNTAX_EXTRA_PARAMETERS = ParserErrorCode(
-    'CATCH_SYNTAX_EXTRA_PARAMETERS',
-    "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
-    correction:
-        "No types are needed, the first is given by 'on', the second is always 'StackTrace'.");
+  'CATCH_SYNTAX_EXTRA_PARAMETERS',
+  "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
+  correction:
+      "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
+);
 
 const ParserErrorCode _CLASS_IN_CLASS = ParserErrorCode(
-    'CLASS_IN_CLASS', "Classes can't be declared inside other classes.",
-    correction: "Try moving the class to the top-level.");
+  'CLASS_IN_CLASS',
+  "Classes can't be declared inside other classes.",
+  correction: "Try moving the class to the top-level.",
+);
 
 const ParserErrorCode _COLON_IN_PLACE_OF_IN = ParserErrorCode(
-    'COLON_IN_PLACE_OF_IN', "For-in loops use 'in' rather than a colon.",
-    correction: "Try replacing the colon with the keyword 'in'.");
+  'COLON_IN_PLACE_OF_IN',
+  "For-in loops use 'in' rather than a colon.",
+  correction: "Try replacing the colon with the keyword 'in'.",
+);
 
 const ParserErrorCode _CONFLICTING_MODIFIERS = ParserErrorCode(
-    'CONFLICTING_MODIFIERS',
-    "Members can't be declared to be both '{0}' and '{1}'.",
-    correction: "Try removing one of the keywords.");
+  'CONFLICTING_MODIFIERS',
+  "Members can't be declared to be both '{0}' and '{1}'.",
+  correction: "Try removing one of the keywords.",
+);
 
 const ParserErrorCode _CONSTRUCTOR_WITH_RETURN_TYPE = ParserErrorCode(
-    'CONSTRUCTOR_WITH_RETURN_TYPE', "Constructors can't have a return type.",
-    correction: "Try removing the return type.");
+  'CONSTRUCTOR_WITH_RETURN_TYPE',
+  "Constructors can't have a return type.",
+  correction: "Try removing the return type.",
+);
 
 const ParserErrorCode _CONSTRUCTOR_WITH_TYPE_ARGUMENTS = ParserErrorCode(
-    'CONSTRUCTOR_WITH_TYPE_ARGUMENTS',
-    "A constructor invocation can't have type arguments after the constructor name.",
-    correction:
-        "Try removing the type arguments or placing them after the class name.");
+  'CONSTRUCTOR_WITH_TYPE_ARGUMENTS',
+  "A constructor invocation can't have type arguments after the constructor name.",
+  correction:
+      "Try removing the type arguments or placing them after the class name.",
+);
 
-const ParserErrorCode _CONST_AND_FINAL = ParserErrorCode('CONST_AND_FINAL',
-    "Members can't be declared to be both 'const' and 'final'.",
-    correction: "Try removing either the 'const' or 'final' keyword.");
+const ParserErrorCode _CONST_AND_FINAL = ParserErrorCode(
+  'CONST_AND_FINAL',
+  "Members can't be declared to be both 'const' and 'final'.",
+  correction: "Try removing either the 'const' or 'final' keyword.",
+);
 
 const ParserErrorCode _CONST_CLASS = ParserErrorCode(
-    'CONST_CLASS', "Classes can't be declared to be 'const'.",
-    correction:
-        "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s).");
+  'CONST_CLASS',
+  "Classes can't be declared to be 'const'.",
+  correction:
+      "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on  the class' constructor(s).",
+);
 
-const ParserErrorCode _CONST_FACTORY = ParserErrorCode('CONST_FACTORY',
-    "Only redirecting factory constructors can be declared to be 'const'.",
-    correction:
-        "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.");
+const ParserErrorCode _CONST_FACTORY = ParserErrorCode(
+  'CONST_FACTORY',
+  "Only redirecting factory constructors can be declared to be 'const'.",
+  correction:
+      "Try removing the 'const' keyword, or replacing the body with '=' followed by a valid target.",
+);
 
-const ParserErrorCode _CONST_METHOD = ParserErrorCode('CONST_METHOD',
-    "Getters, setters and methods can't be declared to be 'const'.",
-    correction: "Try removing the 'const' keyword.");
+const ParserErrorCode _CONST_METHOD = ParserErrorCode(
+  'CONST_METHOD',
+  "Getters, setters and methods can't be declared to be 'const'.",
+  correction: "Try removing the 'const' keyword.",
+);
 
 const ParserErrorCode _CONTINUE_OUTSIDE_OF_LOOP = ParserErrorCode(
-    'CONTINUE_OUTSIDE_OF_LOOP',
-    "A continue statement can't be used outside of a loop or switch statement.",
-    correction: "Try removing the continue statement.");
+  'CONTINUE_OUTSIDE_OF_LOOP',
+  "A continue statement can't be used outside of a loop or switch statement.",
+  correction: "Try removing the continue statement.",
+);
 
 const ParserErrorCode _CONTINUE_WITHOUT_LABEL_IN_CASE = ParserErrorCode(
-    'CONTINUE_WITHOUT_LABEL_IN_CASE',
-    "A continue statement in a switch statement must have a label as a target.",
-    correction:
-        "Try adding a label associated with one of the case clauses to the continue statement.");
+  'CONTINUE_WITHOUT_LABEL_IN_CASE',
+  "A continue statement in a switch statement must have a label as a target.",
+  correction:
+      "Try adding a label associated with one of the case clauses to the continue statement.",
+);
 
 const ParserErrorCode _COVARIANT_AND_STATIC = ParserErrorCode(
-    'COVARIANT_AND_STATIC',
-    "Members can't be declared to be both 'covariant' and 'static'.",
-    correction: "Try removing either the 'covariant' or 'static' keyword.");
+  'COVARIANT_AND_STATIC',
+  "Members can't be declared to be both 'covariant' and 'static'.",
+  correction: "Try removing either the 'covariant' or 'static' keyword.",
+);
 
-const ParserErrorCode _COVARIANT_MEMBER = ParserErrorCode('COVARIANT_MEMBER',
-    "Getters, setters and methods can't be declared to be 'covariant'.",
-    correction: "Try removing the 'covariant' keyword.");
+const ParserErrorCode _COVARIANT_MEMBER = ParserErrorCode(
+  'COVARIANT_MEMBER',
+  "Getters, setters and methods can't be declared to be 'covariant'.",
+  correction: "Try removing the 'covariant' keyword.",
+);
 
 const ParserErrorCode _DEFERRED_AFTER_PREFIX = ParserErrorCode(
-    'DEFERRED_AFTER_PREFIX',
-    "The deferred keyword should come immediately before the prefix ('as' clause).",
-    correction: "Try moving the deferred keyword before the prefix.");
+  'DEFERRED_AFTER_PREFIX',
+  "The deferred keyword should come immediately before the prefix ('as' clause).",
+  correction: "Try moving the deferred keyword before the prefix.",
+);
 
 const ParserErrorCode _DIRECTIVE_AFTER_DECLARATION = ParserErrorCode(
-    'DIRECTIVE_AFTER_DECLARATION',
-    "Directives must appear before any declarations.",
-    correction: "Try moving the directive before any declarations.");
+  'DIRECTIVE_AFTER_DECLARATION',
+  "Directives must appear before any declarations.",
+  correction: "Try moving the directive before any declarations.",
+);
 
 const ParserErrorCode _DUPLICATED_MODIFIER = ParserErrorCode(
-    'DUPLICATED_MODIFIER', "The modifier '{0}' was already specified.",
-    correction: "Try removing all but one occurrence of the modifier.");
+  'DUPLICATED_MODIFIER',
+  "The modifier '{0}' was already specified.",
+  correction: "Try removing all but one occurrence of the modifier.",
+);
 
 const ParserErrorCode _DUPLICATE_DEFERRED = ParserErrorCode(
-    'DUPLICATE_DEFERRED',
-    "An import directive can only have one 'deferred' keyword.",
-    correction: "Try removing all but one 'deferred' keyword.");
+  'DUPLICATE_DEFERRED',
+  "An import directive can only have one 'deferred' keyword.",
+  correction: "Try removing all but one 'deferred' keyword.",
+);
 
 const ParserErrorCode _DUPLICATE_LABEL_IN_SWITCH_STATEMENT = ParserErrorCode(
-    'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
-    "The label '{0}' was already used in this switch statement.",
-    correction: "Try choosing a different name for this label.");
+  'DUPLICATE_LABEL_IN_SWITCH_STATEMENT',
+  "The label '{0}' was already used in this switch statement.",
+  correction: "Try choosing a different name for this label.",
+);
 
-const ParserErrorCode _DUPLICATE_PREFIX = ParserErrorCode('DUPLICATE_PREFIX',
-    "An import directive can only have one prefix ('as' clause).",
-    correction: "Try removing all but one prefix.");
+const ParserErrorCode _DUPLICATE_PREFIX = ParserErrorCode(
+  'DUPLICATE_PREFIX',
+  "An import directive can only have one prefix ('as' clause).",
+  correction: "Try removing all but one prefix.",
+);
 
 const ParserErrorCode _ENUM_IN_CLASS = ParserErrorCode(
-    'ENUM_IN_CLASS', "Enums can't be declared inside classes.",
-    correction: "Try moving the enum to the top-level.");
+  'ENUM_IN_CLASS',
+  "Enums can't be declared inside classes.",
+  correction: "Try moving the enum to the top-level.",
+);
 
 const ParserErrorCode _EQUALITY_CANNOT_BE_EQUALITY_OPERAND = ParserErrorCode(
-    'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
-    "A comparison expression can't be an operand of another comparison expression.",
-    correction: "Try putting parentheses around one of the comparisons.");
+  'EQUALITY_CANNOT_BE_EQUALITY_OPERAND',
+  "A comparison expression can't be an operand of another comparison expression.",
+  correction: "Try putting parentheses around one of the comparisons.",
+);
 
 const ParserErrorCode _EXPECTED_BODY = ParserErrorCode(
-    'EXPECTED_BODY', "A {0} must have a body, even if it is empty.",
-    correction: "Try adding an empty body.");
+  'EXPECTED_BODY',
+  "A {0} must have a body, even if it is empty.",
+  correction: "Try adding an empty body.",
+);
 
-const ParserErrorCode _EXPECTED_ELSE_OR_COMMA =
-    ParserErrorCode('EXPECTED_ELSE_OR_COMMA', "Expected 'else' or comma.");
+const ParserErrorCode _EXPECTED_ELSE_OR_COMMA = ParserErrorCode(
+  'EXPECTED_ELSE_OR_COMMA',
+  "Expected 'else' or comma.",
+);
 
 const ParserErrorCode _EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD = ParserErrorCode(
-    'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
-    "'{0}' can't be used as an identifier because it's a keyword.",
-    correction: "Try renaming this to be an identifier that isn't a keyword.");
+  'EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD',
+  "'{0}' can't be used as an identifier because it's a keyword.",
+  correction: "Try renaming this to be an identifier that isn't a keyword.",
+);
 
-const ParserErrorCode _EXPECTED_INSTEAD =
-    ParserErrorCode('EXPECTED_INSTEAD', "Expected '{0}' instead of this.");
+const ParserErrorCode _EXPECTED_INSTEAD = ParserErrorCode(
+  'EXPECTED_INSTEAD',
+  "Expected '{0}' instead of this.",
+);
 
 const ParserErrorCode _EXPERIMENT_NOT_ENABLED = ParserErrorCode(
-    'EXPERIMENT_NOT_ENABLED',
-    "This requires the '{0}' language feature to be enabled.",
-    correction:
-        "Try updating your pubspec.yaml to set the minimum SDK constraint to {1} or higher, and running 'pub get'.");
+  'EXPERIMENT_NOT_ENABLED',
+  "This requires the '{0}' language feature to be enabled.",
+  correction:
+      "Try updating your pubspec.yaml to set the minimum SDK constraint to {1} or higher, and running 'pub get'.",
+);
 
 const ParserErrorCode _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
-    'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-    "Export directives must precede part directives.",
-    correction: "Try moving the export directives before the part directives.");
+  'EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+  "Export directives must precede part directives.",
+  correction: "Try moving the export directives before the part directives.",
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_ABSTRACT_MEMBER = ParserErrorCode(
-    'EXTENSION_DECLARES_ABSTRACT_MEMBER',
-    "Extensions can't declare abstract members.",
-    correction: "Try providing an implementation for the member.",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_ABSTRACT_MEMBER',
+  "Extensions can't declare abstract members.",
+  correction: "Try providing an implementation for the member.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_CONSTRUCTOR = ParserErrorCode(
-    'EXTENSION_DECLARES_CONSTRUCTOR', "Extensions can't declare constructors.",
-    correction: "Try removing the constructor declaration.",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_CONSTRUCTOR',
+  "Extensions can't declare constructors.",
+  correction: "Try removing the constructor declaration.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTENSION_DECLARES_INSTANCE_FIELD = ParserErrorCode(
-    'EXTENSION_DECLARES_INSTANCE_FIELD',
-    "Extensions can't declare instance fields",
-    correction:
-        "Try removing the field declaration or making it a static field",
-    hasPublishedDocs: true);
+  'EXTENSION_DECLARES_INSTANCE_FIELD',
+  "Extensions can't declare instance fields",
+  correction: "Try removing the field declaration or making it a static field",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _EXTERNAL_CLASS = ParserErrorCode(
-    'EXTERNAL_CLASS', "Classes can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_CLASS',
+  "Classes can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_CONSTRUCTOR_WITH_BODY',
-    "External constructors can't have a body.",
-    correction:
-        "Try removing the body of the constructor, or removing the keyword 'external'.");
+  'EXTERNAL_CONSTRUCTOR_WITH_BODY',
+  "External constructors can't have a body.",
+  correction:
+      "Try removing the body of the constructor, or removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER = ParserErrorCode(
-    'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
-    "An external constructor can't have any initializers.");
+  'EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER',
+  "An external constructor can't have any initializers.",
+);
 
 const ParserErrorCode _EXTERNAL_ENUM = ParserErrorCode(
-    'EXTERNAL_ENUM', "Enums can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_ENUM',
+  "Enums can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_FACTORY_REDIRECTION = ParserErrorCode(
-    'EXTERNAL_FACTORY_REDIRECTION', "A redirecting factory can't be external.",
-    correction: "Try removing the 'external' modifier.");
+  'EXTERNAL_FACTORY_REDIRECTION',
+  "A redirecting factory can't be external.",
+  correction: "Try removing the 'external' modifier.",
+);
 
 const ParserErrorCode _EXTERNAL_FACTORY_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_FACTORY_WITH_BODY', "External factories can't have a body.",
-    correction:
-        "Try removing the body of the factory, or removing the keyword 'external'.");
+  'EXTERNAL_FACTORY_WITH_BODY',
+  "External factories can't have a body.",
+  correction:
+      "Try removing the body of the factory, or removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTERNAL_FIELD = ParserErrorCode(
-    'EXTERNAL_FIELD', "Fields can't be declared to be 'external'.",
-    correction:
-        "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.");
+  'EXTERNAL_FIELD',
+  "Fields can't be declared to be 'external'.",
+  correction:
+      "Try removing the keyword 'external', or replacing the field by an external getter and/or setter.",
+);
 
 const ParserErrorCode _EXTERNAL_LATE_FIELD = ParserErrorCode(
-    'EXTERNAL_LATE_FIELD', "External fields cannot be late.",
-    correction: "Try removing the 'external' or 'late' keyword.");
+  'EXTERNAL_LATE_FIELD',
+  "External fields cannot be late.",
+  correction: "Try removing the 'external' or 'late' keyword.",
+);
 
 const ParserErrorCode _EXTERNAL_METHOD_WITH_BODY = ParserErrorCode(
-    'EXTERNAL_METHOD_WITH_BODY',
-    "An external or native method can't have a body.");
+  'EXTERNAL_METHOD_WITH_BODY',
+  "An external or native method can't have a body.",
+);
 
 const ParserErrorCode _EXTERNAL_TYPEDEF = ParserErrorCode(
-    'EXTERNAL_TYPEDEF', "Typedefs can't be declared to be 'external'.",
-    correction: "Try removing the keyword 'external'.");
+  'EXTERNAL_TYPEDEF',
+  "Typedefs can't be declared to be 'external'.",
+  correction: "Try removing the keyword 'external'.",
+);
 
 const ParserErrorCode _EXTRANEOUS_MODIFIER = ParserErrorCode(
-    'EXTRANEOUS_MODIFIER', "Can't have modifier '{0}' here.",
-    correction: "Try removing '{0}'.");
+  'EXTRANEOUS_MODIFIER',
+  "Can't have modifier '{0}' here.",
+  correction: "Try removing '{0}'.",
+);
 
 const ParserErrorCode _FACTORY_TOP_LEVEL_DECLARATION = ParserErrorCode(
-    'FACTORY_TOP_LEVEL_DECLARATION',
-    "Top-level declarations can't be declared to be 'factory'.",
-    correction: "Try removing the keyword 'factory'.");
+  'FACTORY_TOP_LEVEL_DECLARATION',
+  "Top-level declarations can't be declared to be 'factory'.",
+  correction: "Try removing the keyword 'factory'.",
+);
 
-const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS = ParserErrorCode(
-    'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
-    "A field can only be initialized in its declaring class",
-    correction:
-        "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.");
+const ParserErrorCode _FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS =
+    ParserErrorCode(
+  'FIELD_INITIALIZED_OUTSIDE_DECLARING_CLASS',
+  "A field can only be initialized in its declaring class",
+  correction:
+      "Try passing a value into the superclass constructor, or moving the initialization into the constructor body.",
+);
 
 const ParserErrorCode _FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR = ParserErrorCode(
-    'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
-    "Field formal parameters can only be used in a constructor.",
-    correction: "Try removing 'this.'.");
+  'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
+  "Field formal parameters can only be used in a constructor.",
+  correction: "Try removing 'this.'.",
+);
 
 const ParserErrorCode _FINAL_AND_COVARIANT = ParserErrorCode(
-    'FINAL_AND_COVARIANT',
-    "Members can't be declared to be both 'final' and 'covariant'.",
-    correction: "Try removing either the 'final' or 'covariant' keyword.");
+  'FINAL_AND_COVARIANT',
+  "Members can't be declared to be both 'final' and 'covariant'.",
+  correction: "Try removing either the 'final' or 'covariant' keyword.",
+);
 
-const ParserErrorCode _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER = ParserErrorCode(
-    'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
-    "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
-    correction:
-        "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.");
+const ParserErrorCode _FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER =
+    ParserErrorCode(
+  'FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER',
+  "Members marked 'late' with an initializer can't be declared to be both 'final' and 'covariant'.",
+  correction:
+      "Try removing either the 'final' or 'covariant' keyword, or removing the initializer.",
+);
 
 const ParserErrorCode _FINAL_AND_VAR = ParserErrorCode(
-    'FINAL_AND_VAR', "Members can't be declared to be both 'final' and 'var'.",
-    correction: "Try removing the keyword 'var'.");
+  'FINAL_AND_VAR',
+  "Members can't be declared to be both 'final' and 'var'.",
+  correction: "Try removing the keyword 'var'.",
+);
 
 const ParserErrorCode _GETTER_CONSTRUCTOR = ParserErrorCode(
-    'GETTER_CONSTRUCTOR', "Constructors can't be a getter.",
-    correction: "Try removing 'get'.");
+  'GETTER_CONSTRUCTOR',
+  "Constructors can't be a getter.",
+  correction: "Try removing 'get'.",
+);
 
 const ParserErrorCode _ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE = ParserErrorCode(
-    'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
-    "Illegal assignment to non-assignable expression.");
+  'ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE',
+  "Illegal assignment to non-assignable expression.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_EXTENDS = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_EXTENDS',
-    "The extends clause must be before the implements clause.",
-    correction: "Try moving the extends clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_EXTENDS',
+  "The extends clause must be before the implements clause.",
+  correction: "Try moving the extends clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_ON = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_ON',
-    "The on clause must be before the implements clause.",
-    correction: "Try moving the on clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_ON',
+  "The on clause must be before the implements clause.",
+  correction: "Try moving the on clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPLEMENTS_BEFORE_WITH = ParserErrorCode(
-    'IMPLEMENTS_BEFORE_WITH',
-    "The with clause must be before the implements clause.",
-    correction: "Try moving the with clause before the implements clause.");
+  'IMPLEMENTS_BEFORE_WITH',
+  "The with clause must be before the implements clause.",
+  correction: "Try moving the with clause before the implements clause.",
+);
 
 const ParserErrorCode _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE = ParserErrorCode(
-    'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-    "Import directives must precede part directives.",
-    correction: "Try moving the import directives before the part directives.");
+  'IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
+  "Import directives must precede part directives.",
+  correction: "Try moving the import directives before the part directives.",
+);
 
 const ParserErrorCode _INITIALIZED_VARIABLE_IN_FOR_EACH = ParserErrorCode(
-    'INITIALIZED_VARIABLE_IN_FOR_EACH',
-    "The loop variable in a for-each loop can't be initialized.",
-    correction:
-        "Try removing the initializer, or using a different kind of loop.");
+  'INITIALIZED_VARIABLE_IN_FOR_EACH',
+  "The loop variable in a for-each loop can't be initialized.",
+  correction:
+      "Try removing the initializer, or using a different kind of loop.",
+);
 
 const ParserErrorCode _INVALID_AWAIT_IN_FOR = ParserErrorCode(
-    'INVALID_AWAIT_IN_FOR',
-    "The keyword 'await' isn't allowed for a normal 'for' statement.",
-    correction: "Try removing the keyword, or use a for-each statement.");
+  'INVALID_AWAIT_IN_FOR',
+  "The keyword 'await' isn't allowed for a normal 'for' statement.",
+  correction: "Try removing the keyword, or use a for-each statement.",
+);
 
 const ParserErrorCode _INVALID_CONSTRUCTOR_NAME = ParserErrorCode(
-    'INVALID_CONSTRUCTOR_NAME',
-    "The name of a constructor must match the name of the enclosing class.");
+  'INVALID_CONSTRUCTOR_NAME',
+  "The name of a constructor must match the name of the enclosing class.",
+);
 
 const ParserErrorCode _INVALID_HEX_ESCAPE = ParserErrorCode(
-    'INVALID_HEX_ESCAPE',
-    "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits.");
+  'INVALID_HEX_ESCAPE',
+  "An escape sequence starting with '\\x' must be followed by 2 hexadecimal digits.",
+);
 
 const ParserErrorCode _INVALID_INITIALIZER = ParserErrorCode(
-    'INVALID_INITIALIZER', "Not a valid initializer.",
-    correction: "To initialize a field, use the syntax 'name = value'.");
+  'INVALID_INITIALIZER',
+  "Not a valid initializer.",
+  correction: "To initialize a field, use the syntax 'name = value'.",
+);
 
 const ParserErrorCode _INVALID_OPERATOR = ParserErrorCode(
-    'INVALID_OPERATOR', "The string '{0}' isn't a user-definable operator.");
+  'INVALID_OPERATOR',
+  "The string '{0}' isn't a user-definable operator.",
+);
 
 const ParserErrorCode _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER =
-    ParserErrorCode('INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
-        "The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
-        correction: "Try replacing '?.' with '.'");
+    ParserErrorCode(
+  'INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER',
+  "The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
+  correction: "Try replacing '?.' with '.'",
+);
 
 const ParserErrorCode _INVALID_SUPER_IN_INITIALIZER = ParserErrorCode(
-    'INVALID_SUPER_IN_INITIALIZER',
-    "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')");
+  'INVALID_SUPER_IN_INITIALIZER',
+  "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')",
+);
 
 const ParserErrorCode _INVALID_THIS_IN_INITIALIZER = ParserErrorCode(
-    'INVALID_THIS_IN_INITIALIZER',
-    "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())");
+  'INVALID_THIS_IN_INITIALIZER',
+  "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())",
+);
 
 const ParserErrorCode _INVALID_UNICODE_ESCAPE = ParserErrorCode(
-    'INVALID_UNICODE_ESCAPE',
-    "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.");
+  'INVALID_UNICODE_ESCAPE',
+  "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.",
+);
 
 const ParserErrorCode _INVALID_USE_OF_COVARIANT_IN_EXTENSION = ParserErrorCode(
-    'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
-    "Can't have modifier '{0}' in an extension.",
-    correction: "Try removing '{0}'.",
-    hasPublishedDocs: true);
+  'INVALID_USE_OF_COVARIANT_IN_EXTENSION',
+  "Can't have modifier '{0}' in an extension.",
+  correction: "Try removing '{0}'.",
+  hasPublishedDocs: true,
+);
 
 const ParserErrorCode _LIBRARY_DIRECTIVE_NOT_FIRST = ParserErrorCode(
-    'LIBRARY_DIRECTIVE_NOT_FIRST',
-    "The library directive must appear before all other directives.",
-    correction:
-        "Try moving the library directive before any other directives.");
+  'LIBRARY_DIRECTIVE_NOT_FIRST',
+  "The library directive must appear before all other directives.",
+  correction: "Try moving the library directive before any other directives.",
+);
 
 const ParserErrorCode _LITERAL_WITH_CLASS = ParserErrorCode(
-    'LITERAL_WITH_CLASS', "A {0} literal can't be prefixed by '{1}'.",
-    correction: "Try removing '{1}'");
+  'LITERAL_WITH_CLASS',
+  "A {0} literal can't be prefixed by '{1}'.",
+  correction: "Try removing '{1}'",
+);
 
 const ParserErrorCode _LITERAL_WITH_CLASS_AND_NEW = ParserErrorCode(
-    'LITERAL_WITH_CLASS_AND_NEW',
-    "A {0} literal can't be prefixed by 'new {1}'.",
-    correction: "Try removing 'new' and '{1}'");
+  'LITERAL_WITH_CLASS_AND_NEW',
+  "A {0} literal can't be prefixed by 'new {1}'.",
+  correction: "Try removing 'new' and '{1}'",
+);
 
 const ParserErrorCode _LITERAL_WITH_NEW = ParserErrorCode(
-    'LITERAL_WITH_NEW', "A literal can't be prefixed by 'new'.",
-    correction: "Try removing 'new'");
+  'LITERAL_WITH_NEW',
+  "A literal can't be prefixed by 'new'.",
+  correction: "Try removing 'new'",
+);
 
 const ParserErrorCode _MEMBER_WITH_CLASS_NAME = ParserErrorCode(
-    'MEMBER_WITH_CLASS_NAME',
-    "A class member can't have the same name as the enclosing class.",
-    correction: "Try renaming the member.");
+  'MEMBER_WITH_CLASS_NAME',
+  "A class member can't have the same name as the enclosing class.",
+  correction: "Try renaming the member.",
+);
 
 const ParserErrorCode _MISSING_ASSIGNABLE_SELECTOR = ParserErrorCode(
-    'MISSING_ASSIGNABLE_SELECTOR',
-    "Missing selector such as '.identifier' or '[0]'.",
-    correction: "Try adding a selector.");
+  'MISSING_ASSIGNABLE_SELECTOR',
+  "Missing selector such as '.identifier' or '[0]'.",
+  correction: "Try adding a selector.",
+);
 
 const ParserErrorCode _MISSING_ASSIGNMENT_IN_INITIALIZER = ParserErrorCode(
-    'MISSING_ASSIGNMENT_IN_INITIALIZER',
-    "Expected an assignment after the field name.",
-    correction: "To initialize a field, use the syntax 'name = value'.");
+  'MISSING_ASSIGNMENT_IN_INITIALIZER',
+  "Expected an assignment after the field name.",
+  correction: "To initialize a field, use the syntax 'name = value'.",
+);
 
 const ParserErrorCode _MISSING_CATCH_OR_FINALLY = ParserErrorCode(
-    'MISSING_CATCH_OR_FINALLY',
-    "A try block must be followed by an 'on', 'catch', or 'finally' clause.",
-    correction:
-        "Try adding either a catch or finally clause, or remove the try statement.");
+  'MISSING_CATCH_OR_FINALLY',
+  "A try block must be followed by an 'on', 'catch', or 'finally' clause.",
+  correction:
+      "Try adding either a catch or finally clause, or remove the try statement.",
+);
 
 const ParserErrorCode _MISSING_CONST_FINAL_VAR_OR_TYPE = ParserErrorCode(
-    'MISSING_CONST_FINAL_VAR_OR_TYPE',
-    "Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
-    correction:
-        "Try adding the name of the type of the variable or the keyword 'var'.");
+  'MISSING_CONST_FINAL_VAR_OR_TYPE',
+  "Variables must be declared using the keywords 'const', 'final', 'var' or a type name.",
+  correction:
+      "Try adding the name of the type of the variable or the keyword 'var'.",
+);
 
 const ParserErrorCode _MISSING_EXPRESSION_IN_THROW = ParserErrorCode(
-    'MISSING_EXPRESSION_IN_THROW', "Missing expression after 'throw'.",
-    correction:
-        "Add an expression after 'throw' or use 'rethrow' to throw a caught exception");
+  'MISSING_EXPRESSION_IN_THROW',
+  "Missing expression after 'throw'.",
+  correction:
+      "Add an expression after 'throw' or use 'rethrow' to throw a caught exception",
+);
 
-const ParserErrorCode _MISSING_INITIALIZER =
-    ParserErrorCode('MISSING_INITIALIZER', "Expected an initializer.");
+const ParserErrorCode _MISSING_INITIALIZER = ParserErrorCode(
+  'MISSING_INITIALIZER',
+  "Expected an initializer.",
+);
 
 const ParserErrorCode _MISSING_KEYWORD_OPERATOR = ParserErrorCode(
-    'MISSING_KEYWORD_OPERATOR',
-    "Operator declarations must be preceded by the keyword 'operator'.",
-    correction: "Try adding the keyword 'operator'.");
+  'MISSING_KEYWORD_OPERATOR',
+  "Operator declarations must be preceded by the keyword 'operator'.",
+  correction: "Try adding the keyword 'operator'.",
+);
 
 const ParserErrorCode _MISSING_PREFIX_IN_DEFERRED_IMPORT = ParserErrorCode(
-    'MISSING_PREFIX_IN_DEFERRED_IMPORT',
-    "Deferred imports should have a prefix.",
-    correction: "Try adding a prefix to the import by adding an 'as' clause.");
+  'MISSING_PREFIX_IN_DEFERRED_IMPORT',
+  "Deferred imports should have a prefix.",
+  correction: "Try adding a prefix to the import by adding an 'as' clause.",
+);
 
-const ParserErrorCode _MISSING_STATEMENT =
-    ParserErrorCode('MISSING_STATEMENT', "Expected a statement.");
+const ParserErrorCode _MISSING_STATEMENT = ParserErrorCode(
+  'MISSING_STATEMENT',
+  "Expected a statement.",
+);
 
 const ParserErrorCode _MIXIN_DECLARES_CONSTRUCTOR = ParserErrorCode(
-    'MIXIN_DECLARES_CONSTRUCTOR', "Mixins can't declare constructors.");
+  'MIXIN_DECLARES_CONSTRUCTOR',
+  "Mixins can't declare constructors.",
+);
 
 const ParserErrorCode _MODIFIER_OUT_OF_ORDER = ParserErrorCode(
-    'MODIFIER_OUT_OF_ORDER',
-    "The modifier '{0}' should be before the modifier '{1}'.",
-    correction: "Try re-ordering the modifiers.");
+  'MODIFIER_OUT_OF_ORDER',
+  "The modifier '{0}' should be before the modifier '{1}'.",
+  correction: "Try re-ordering the modifiers.",
+);
 
 const ParserErrorCode _MULTIPLE_EXTENDS_CLAUSES = ParserErrorCode(
-    'MULTIPLE_EXTENDS_CLAUSES',
-    "Each class definition can have at most one extends clause.",
-    correction:
-        "Try choosing one superclass and define your class to implement (or mix in) the others.");
+  'MULTIPLE_EXTENDS_CLAUSES',
+  "Each class definition can have at most one extends clause.",
+  correction:
+      "Try choosing one superclass and define your class to implement (or mix in) the others.",
+);
 
 const ParserErrorCode _MULTIPLE_LIBRARY_DIRECTIVES = ParserErrorCode(
-    'MULTIPLE_LIBRARY_DIRECTIVES',
-    "Only one library directive may be declared in a file.",
-    correction: "Try removing all but one of the library directives.");
+  'MULTIPLE_LIBRARY_DIRECTIVES',
+  "Only one library directive may be declared in a file.",
+  correction: "Try removing all but one of the library directives.",
+);
 
 const ParserErrorCode _MULTIPLE_ON_CLAUSES = ParserErrorCode(
-    'MULTIPLE_ON_CLAUSES',
-    "Each mixin definition can have at most one on clause.",
-    correction: "Try combining all of the on clauses into a single clause.");
+  'MULTIPLE_ON_CLAUSES',
+  "Each mixin definition can have at most one on clause.",
+  correction: "Try combining all of the on clauses into a single clause.",
+);
 
 const ParserErrorCode _MULTIPLE_PART_OF_DIRECTIVES = ParserErrorCode(
-    'MULTIPLE_PART_OF_DIRECTIVES',
-    "Only one part-of directive may be declared in a file.",
-    correction: "Try removing all but one of the part-of directives.");
+  'MULTIPLE_PART_OF_DIRECTIVES',
+  "Only one part-of directive may be declared in a file.",
+  correction: "Try removing all but one of the part-of directives.",
+);
 
 const ParserErrorCode _MULTIPLE_VARIANCE_MODIFIERS = ParserErrorCode(
-    'MULTIPLE_VARIANCE_MODIFIERS',
-    "Each type parameter can have at most one variance modifier.",
-    correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.");
+  'MULTIPLE_VARIANCE_MODIFIERS',
+  "Each type parameter can have at most one variance modifier.",
+  correction: "Use at most one of the 'in', 'out', or 'inout' modifiers.",
+);
 
 const ParserErrorCode _MULTIPLE_WITH_CLAUSES = ParserErrorCode(
-    'MULTIPLE_WITH_CLAUSES',
-    "Each class definition can have at most one with clause.",
-    correction: "Try combining all of the with clauses into a single clause.");
+  'MULTIPLE_WITH_CLAUSES',
+  "Each class definition can have at most one with clause.",
+  correction: "Try combining all of the with clauses into a single clause.",
+);
 
 const ParserErrorCode _NATIVE_CLAUSE_SHOULD_BE_ANNOTATION = ParserErrorCode(
-    'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
-    "Native clause in this form is deprecated.",
-    correction:
-        "Try removing this native clause and adding @native() or @native('native-name') before the declaration.");
+  'NATIVE_CLAUSE_SHOULD_BE_ANNOTATION',
+  "Native clause in this form is deprecated.",
+  correction:
+      "Try removing this native clause and adding @native() or @native('native-name') before the declaration.",
+);
 
 const ParserErrorCode _NULL_AWARE_CASCADE_OUT_OF_ORDER = ParserErrorCode(
-    'NULL_AWARE_CASCADE_OUT_OF_ORDER',
-    "The '?..' cascade operator must be first in the cascade sequence.",
-    correction:
-        "Try moving the '?..' operator to be the first cascade operator in the sequence.");
+  'NULL_AWARE_CASCADE_OUT_OF_ORDER',
+  "The '?..' cascade operator must be first in the cascade sequence.",
+  correction:
+      "Try moving the '?..' operator to be the first cascade operator in the sequence.",
+);
 
 const ParserErrorCode _PREFIX_AFTER_COMBINATOR = ParserErrorCode(
-    'PREFIX_AFTER_COMBINATOR',
-    "The prefix ('as' clause) should come before any show/hide combinators.",
-    correction: "Try moving the prefix before the combinators.");
+  'PREFIX_AFTER_COMBINATOR',
+  "The prefix ('as' clause) should come before any show/hide combinators.",
+  correction: "Try moving the prefix before the combinators.",
+);
 
 const ParserErrorCode _REDIRECTING_CONSTRUCTOR_WITH_BODY = ParserErrorCode(
-    'REDIRECTING_CONSTRUCTOR_WITH_BODY',
-    "Redirecting constructors can't have a body.",
-    correction:
-        "Try removing the body, or not making this a redirecting constructor.");
+  'REDIRECTING_CONSTRUCTOR_WITH_BODY',
+  "Redirecting constructors can't have a body.",
+  correction:
+      "Try removing the body, or not making this a redirecting constructor.",
+);
 
 const ParserErrorCode _REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR = ParserErrorCode(
-    'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
-    "Only factory constructor can specify '=' redirection.",
-    correction:
-        "Try making this a factory constructor, or remove the redirection.");
+  'REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR',
+  "Only factory constructor can specify '=' redirection.",
+  correction:
+      "Try making this a factory constructor, or remove the redirection.",
+);
 
 const ParserErrorCode _SETTER_CONSTRUCTOR = ParserErrorCode(
-    'SETTER_CONSTRUCTOR', "Constructors can't be a setter.",
-    correction: "Try removing 'set'.");
+  'SETTER_CONSTRUCTOR',
+  "Constructors can't be a setter.",
+  correction: "Try removing 'set'.",
+);
 
 const ParserErrorCode _STACK_OVERFLOW = ParserErrorCode(
-    'STACK_OVERFLOW', "The file has too many nested expressions or statements.",
-    correction: "Try simplifying the code.");
+  'STACK_OVERFLOW',
+  "The file has too many nested expressions or statements.",
+  correction: "Try simplifying the code.",
+);
 
 const ParserErrorCode _STATIC_CONSTRUCTOR = ParserErrorCode(
-    'STATIC_CONSTRUCTOR', "Constructors can't be static.",
-    correction: "Try removing the keyword 'static'.");
+  'STATIC_CONSTRUCTOR',
+  "Constructors can't be static.",
+  correction: "Try removing the keyword 'static'.",
+);
 
 const ParserErrorCode _STATIC_OPERATOR = ParserErrorCode(
-    'STATIC_OPERATOR', "Operators can't be static.",
-    correction: "Try removing the keyword 'static'.");
+  'STATIC_OPERATOR',
+  "Operators can't be static.",
+  correction: "Try removing the keyword 'static'.",
+);
 
 const ParserErrorCode _SWITCH_HAS_CASE_AFTER_DEFAULT_CASE = ParserErrorCode(
-    'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
-    "The default case should be the last case in a switch statement.",
-    correction: "Try moving the default case after the other case clauses.");
+  'SWITCH_HAS_CASE_AFTER_DEFAULT_CASE',
+  "The default case should be the last case in a switch statement.",
+  correction: "Try moving the default case after the other case clauses.",
+);
 
 const ParserErrorCode _SWITCH_HAS_MULTIPLE_DEFAULT_CASES = ParserErrorCode(
-    'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
-    "The 'default' case can only be declared once.",
-    correction: "Try removing all but one default case.");
+  'SWITCH_HAS_MULTIPLE_DEFAULT_CASES',
+  "The 'default' case can only be declared once.",
+  correction: "Try removing all but one default case.",
+);
 
 const ParserErrorCode _TOP_LEVEL_OPERATOR = ParserErrorCode(
-    'TOP_LEVEL_OPERATOR', "Operators must be declared within a class.",
-    correction:
-        "Try removing the operator, moving it to a class, or converting it to be a function.");
+  'TOP_LEVEL_OPERATOR',
+  "Operators must be declared within a class.",
+  correction:
+      "Try removing the operator, moving it to a class, or converting it to be a function.",
+);
 
 const ParserErrorCode _TYPEDEF_IN_CLASS = ParserErrorCode(
-    'TYPEDEF_IN_CLASS', "Typedefs can't be declared inside classes.",
-    correction: "Try moving the typedef to the top-level.");
+  'TYPEDEF_IN_CLASS',
+  "Typedefs can't be declared inside classes.",
+  correction: "Try moving the typedef to the top-level.",
+);
 
 const ParserErrorCode _TYPE_ARGUMENTS_ON_TYPE_VARIABLE = ParserErrorCode(
-    'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
-    "Can't use type arguments with type variable '{0}'.",
-    correction: "Try removing the type arguments.");
+  'TYPE_ARGUMENTS_ON_TYPE_VARIABLE',
+  "Can't use type arguments with type variable '{0}'.",
+  correction: "Try removing the type arguments.",
+);
 
 const ParserErrorCode _TYPE_BEFORE_FACTORY = ParserErrorCode(
-    'TYPE_BEFORE_FACTORY', "Factory constructors cannot have a return type.",
-    correction: "Try removing the type appearing before 'factory'.");
+  'TYPE_BEFORE_FACTORY',
+  "Factory constructors cannot have a return type.",
+  correction: "Try removing the type appearing before 'factory'.",
+);
 
 const ParserErrorCode _TYPE_PARAMETER_ON_CONSTRUCTOR = ParserErrorCode(
-    'TYPE_PARAMETER_ON_CONSTRUCTOR', "Constructors can't have type parameters.",
-    correction: "Try removing the type parameters.");
+  'TYPE_PARAMETER_ON_CONSTRUCTOR',
+  "Constructors can't have type parameters.",
+  correction: "Try removing the type parameters.",
+);
 
-const ParserErrorCode _VAR_AND_TYPE = ParserErrorCode('VAR_AND_TYPE',
-    "Variables can't be declared using both 'var' and a type name.",
-    correction: "Try removing 'var.'");
+const ParserErrorCode _VAR_AND_TYPE = ParserErrorCode(
+  'VAR_AND_TYPE',
+  "Variables can't be declared using both 'var' and a type name.",
+  correction: "Try removing 'var.'",
+);
 
 const ParserErrorCode _VAR_AS_TYPE_NAME = ParserErrorCode(
-    'VAR_AS_TYPE_NAME', "The keyword 'var' can't be used as a type name.");
+  'VAR_AS_TYPE_NAME',
+  "The keyword 'var' can't be used as a type name.",
+);
 
 const ParserErrorCode _VAR_RETURN_TYPE = ParserErrorCode(
-    'VAR_RETURN_TYPE', "The return type can't be 'var'.",
-    correction:
-        "Try removing the keyword 'var', or replacing it with the name of the return type.");
+  'VAR_RETURN_TYPE',
+  "The return type can't be 'var'.",
+  correction:
+      "Try removing the keyword 'var', or replacing it with the name of the return type.",
+);
 
 const ParserErrorCode _VOID_WITH_TYPE_ARGUMENTS = ParserErrorCode(
-    'VOID_WITH_TYPE_ARGUMENTS', "Type 'void' can't have type arguments.",
-    correction: "Try removing the type arguments.");
+  'VOID_WITH_TYPE_ARGUMENTS',
+  "Type 'void' can't have type arguments.",
+  correction: "Try removing the type arguments.",
+);
 
 const ParserErrorCode _WITH_BEFORE_EXTENDS = ParserErrorCode(
-    'WITH_BEFORE_EXTENDS', "The extends clause must be before the with clause.",
-    correction: "Try moving the extends clause before the with clause.");
+  'WITH_BEFORE_EXTENDS',
+  "The extends clause must be before the with clause.",
+  correction: "Try moving the extends clause before the with clause.",
+);
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 0b43ce7..1687c1d 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -2,15800 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/analyzer_error_code.dart';
-
 export 'package:analyzer/src/analysis_options/error/option_codes.dart';
 export 'package:analyzer/src/dart/error/hint_codes.dart';
 export 'package:analyzer/src/dart/error/lint_codes.dart';
 export 'package:analyzer/src/dart/error/todo_codes.dart';
-
-// It is hard to visually separate each code's _doc comment_ from its published
-// _documentation comment_ when each is written as an end-of-line comment.
-// ignore_for_file: slash_for_doc_comments
-
-/**
- * The error codes used for compile time errors. The convention for this class
- * is for the name of the error code to indicate the problem that caused the
- * error to be generated and for the error message to explain what is wrong and,
- * when appropriate, how the problem can be corrected.
- */
-class CompileTimeErrorCode extends AnalyzerErrorCode {
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a field that has the `abstract`
-  // modifier also has an initializer.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `f` is marked as
-  // `abstract` and has an initializer:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int [!f!] = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because `f` is marked as
-  // `abstract` and there's an initializer in the constructor:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int f;
-  //
-  //   C() : [!f!] = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field must be abstract, then remove the initializer:
-  //
-  // ```dart
-  // abstract class C {
-  //   abstract int f;
-  // }
-  // ```
-  //
-  // If the field isn't required to be abstract, then remove the keyword:
-  //
-  // ```dart
-  // abstract class C {
-  //   int f = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER =
-      CompileTimeErrorCode(
-    'ABSTRACT_FIELD_INITIALIZER',
-    "Abstract fields can't have initializers.",
-    correction: "Try removing the field initializer or the 'abstract' keyword "
-        "from the field declaration.",
-    hasPublishedDocs: true,
-    uniqueName: 'ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER',
-  );
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode ABSTRACT_FIELD_INITIALIZER =
-      CompileTimeErrorCode('ABSTRACT_FIELD_INITIALIZER',
-          "Abstract fields can't have initializers.",
-          correction: "Try removing the initializer or the 'abstract' keyword.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the display name for the kind of the found abstract member
-   * 1: the name of the member
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an inherited member is
-  // referenced using `super`, but there is no concrete implementation of the
-  // member in the superclass chain. Abstract members can't be invoked.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `B` doesn't inherit a
-  // concrete implementation of `a`:
-  //
-  // ```dart
-  // abstract class A {
-  //   int get a;
-  // }
-  // class B extends A {
-  //   int get a => super.[!a!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the invocation of the abstract member, possibly replacing it with an
-  // invocation of a concrete member.
-  // TODO(brianwilkerson) This either needs to be generalized (use 'member'
-  //  rather than '{0}') or split into multiple codes.
-  static const CompileTimeErrorCode ABSTRACT_SUPER_MEMBER_REFERENCE =
-      CompileTimeErrorCode('ABSTRACT_SUPER_MEMBER_REFERENCE',
-          "The {0} '{1}' is always abstract in the supertype.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the ambiguous element
-   * 1: the name of the first library in which the type is found
-   * 2: the name of the second library in which the type is found
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when two or more export directives
-  // cause the same name to be exported from multiple libraries.
-  //
-  // #### Example
-  //
-  // Given a file named `a.dart` containing
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class C {}
-  // ```
-  //
-  // And a file named `b.dart` containing
-  //
-  // ```dart
-  // %uri="lib/b.dart"
-  // class C {}
-  // ```
-  //
-  // The following code produces this diagnostic because the name `C` is being
-  // exported from both `a.dart` and `b.dart`:
-  //
-  // ```dart
-  // export 'a.dart';
-  // export [!'b.dart'!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If none of the names in one of the libraries needs to be exported, then
-  // remove the unnecessary export directives:
-  //
-  // ```dart
-  // export 'a.dart';
-  // ```
-  //
-  // If all of the export directives are needed, then hide the name in all
-  // except one of the directives:
-  //
-  // ```dart
-  // export 'a.dart';
-  // export 'b.dart' hide C;
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_EXPORT = CompileTimeErrorCode(
-      'AMBIGUOUS_EXPORT',
-      "The name '{0}' is defined in the libraries '{1}' and '{2}'.",
-      correction: "Try removing the export of one of the libraries, or "
-          "explicitly hiding the name in one of the export directives.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   * 1: the name of the first declaring extension
-   * 2: the name of the second declaring extension
-   */
-  // #### Description
-  //
-  // When code refers to a member of an object (for example, `o.m()` or `o.m` or
-  // `o[i]`) where the static type of `o` doesn't declare the member (`m` or
-  // `[]`, for example), then the analyzer tries to find the member in an
-  // extension. For example, if the member is `m`, then the analyzer looks for
-  // extensions that declare a member named `m` and have an extended type that
-  // the static type of `o` can be assigned to. When there's more than one such
-  // extension in scope, the extension whose extended type is most specific is
-  // selected.
-  //
-  // The analyzer produces this diagnostic when none of the extensions has an
-  // extended type that's more specific than the extended types of all of the
-  // other extensions, making the reference to the member ambiguous.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there's no way to
-  // choose between the member in `E1` and the member in `E2`:
-  //
-  // ```dart
-  // extension E1 on String {
-  //   int get charCount => 1;
-  // }
-  //
-  // extension E2 on String {
-  //   int get charCount => 2;
-  // }
-  //
-  // void f(String s) {
-  //   print(s.[!charCount!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you don't need both extensions, then you can delete or hide one of them.
-  //
-  // If you need both, then explicitly select the one you want to use by using
-  // an extension override:
-  //
-  // ```dart
-  // extension E1 on String {
-  //   int get charCount => length;
-  // }
-  //
-  // extension E2 on String {
-  //   int get charCount => length;
-  // }
-  //
-  // void f(String s) {
-  //   print(E2(s).charCount);
-  // }
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_EXTENSION_MEMBER_ACCESS =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_EXTENSION_MEMBER_ACCESS',
-          "A member named '{0}' is defined in extensions {1}, and "
-              "none are more specific.",
-          correction:
-              "Try using an extension override to specify the extension "
-              "you want to be chosen.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the ambiguous type
-   * 1: the name of the first library that the type is found
-   * 2: the name of the second library that the type is found
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a name is referenced that is
-  // declared in two or more imported libraries.
-  //
-  // #### Examples
-  //
-  // Given a library (`a.dart`) that defines a class (`C` in this example):
-  //
-  // ```dart
-  // %uri="lib/a.dart"
-  // class A {}
-  // class C {}
-  // ```
-  //
-  // And a library (`b.dart`) that defines a different class with the same name:
-  //
-  // ```dart
-  // %uri="lib/b.dart"
-  // class B {}
-  // class C {}
-  // ```
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // import 'a.dart';
-  // import 'b.dart';
-  //
-  // void f([!C!] c1, [!C!] c2) {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If any of the libraries aren't needed, then remove the import directives
-  // for them:
-  //
-  // ```dart
-  // import 'a.dart';
-  //
-  // void f(C c1, C c2) {}
-  // ```
-  //
-  // If the name is still defined by more than one library, then add a `hide`
-  // clause to the import directives for all except one library:
-  //
-  // ```dart
-  // import 'a.dart' hide C;
-  // import 'b.dart';
-  //
-  // void f(C c1, C c2) {}
-  // ```
-  //
-  // If you must be able to reference more than one of these types, then add a
-  // prefix to each of the import directives, and qualify the references with
-  // the appropriate prefix:
-  //
-  // ```dart
-  // import 'a.dart' as a;
-  // import 'b.dart' as b;
-  //
-  // void f(a.C c1, b.C c2) {}
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_IMPORT = CompileTimeErrorCode(
-      'AMBIGUOUS_IMPORT', "The name '{0}' is defined in the libraries {1}.",
-      correction: "Try using 'as prefix' for one of the import directives, or "
-          "hiding the name from all but one of the imports.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // Because map and set literals use the same delimiters (`{` and `}`), the
-  // analyzer looks at the type arguments and the elements to determine which
-  // kind of literal you meant. When there are no type arguments, then the
-  // analyzer uses the types of the elements. If all of the elements are literal
-  // map entries and all of the spread operators are spreading a `Map` then it's
-  // a `Map`. If none of the elements are literal map entries and all of the
-  // spread operators are spreading an `Iterable`, then it's a `Set`. If neither
-  // of those is true then it's ambiguous.
-  //
-  // The analyzer produces this diagnostic when at least one element is a
-  // literal map entry or a spread operator spreading a `Map`, and at least one
-  // element is neither of these, making it impossible for the analyzer to
-  // determine whether you are writing a map literal or a set literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     [!{...a, ...b, ...c}!];
-  // ```
-  //
-  // The list `b` can only be spread into a set, and the maps `a` and `c` can
-  // only be spread into a map, and the literal can't be both.
-  //
-  // #### Common fixes
-  //
-  // There are two common ways to fix this problem. The first is to remove all
-  // of the spread elements of one kind or another, so that the elements are
-  // consistent. In this case, that likely means removing the list and deciding
-  // what to do about the now unused parameter:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     {...a, ...c};
-  // ```
-  //
-  // The second fix is to change the elements of one kind into elements that are
-  // consistent with the other elements. For example, you can add the elements
-  // of the list as keys that map to themselves:
-  //
-  // ```dart
-  // union(Map<String, String> a, List<String> b, Map<String, String> c) =>
-  //     {...a, for (String s in b) s: s, ...c};
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
-          "The literal can't be either a map or a set because it contains at "
-              "least one literal map entry or a spread operator spreading a "
-              "'Map', and at least one element which is neither of these.",
-          correction:
-              "Try removing or changing some of the elements so that all of "
-              "the elements are consistent.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // Because map and set literals use the same delimiters (`{` and `}`), the
-  // analyzer looks at the type arguments and the elements to determine which
-  // kind of literal you meant. When there are no type arguments and all of the
-  // elements are spread elements (which are allowed in both kinds of literals)
-  // then the analyzer uses the types of the expressions that are being spread.
-  // If all of the expressions have the type `Iterable`, then it's a set
-  // literal; if they all have the type `Map`, then it's a map literal.
-  //
-  // This diagnostic is produced when none of the expressions being spread have
-  // a type that allows the analyzer to decide whether you were writing a map
-  // literal or a set literal.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic:
-  //
-  // ```dart
-  // union(a, b) => [!{...a, ...b}!];
-  // ```
-  //
-  // The problem occurs because there are no type arguments, and there is no
-  // information about the type of either `a` or `b`.
-  //
-  // #### Common fixes
-  //
-  // There are three common ways to fix this problem. The first is to add type
-  // arguments to the literal. For example, if the literal is intended to be a
-  // map literal, you might write something like this:
-  //
-  // ```dart
-  // union(a, b) => <String, String>{...a, ...b};
-  // ```
-  //
-  // The second fix is to add type information so that the expressions have
-  // either the type `Iterable` or the type `Map`. You can add an explicit cast
-  // or, in this case, add types to the declarations of the two parameters:
-  //
-  // ```dart
-  // union(List<int> a, List<int> b) => {...a, ...b};
-  // ```
-  //
-  // The third fix is to add context information. In this case, that means
-  // adding a return type to the function:
-  //
-  // ```dart
-  // Set<String> union(a, b) => {...a, ...b};
-  // ```
-  //
-  // In other cases, you might add a type somewhere else. For example, say the
-  // original code looks like this:
-  //
-  // ```dart
-  // union(a, b) {
-  //   var x = [!{...a, ...b}!];
-  //   return x;
-  // }
-  // ```
-  //
-  // You might add a type annotation on `x`, like this:
-  //
-  // ```dart
-  // union(a, b) {
-  //   Map<String, String> x = {...a, ...b};
-  //   return x;
-  // }
-  // ```
-  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
-      CompileTimeErrorCode(
-          'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
-          "This literal must be either a map or a set, but the elements don't "
-              "have enough information for type inference to work.",
-          correction:
-              "Try adding type arguments to the literal (one for sets, two "
-              "for maps).",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the actual argument type
-   * 1: the name of the expected type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the static type of an argument
-  // can't be assigned to the static type of the corresponding parameter.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because a `num` can't be
-  // assigned to a `String`:
-  //
-  // ```dart
-  // %language=2.9
-  // String f(String x) => x;
-  // String g(num y) => f([!y!]);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If possible, rewrite the code so that the static type is assignable. In the
-  // example above you might be able to change the type of the parameter `y`:
-  //
-  // ```dart
-  // %language=2.9
-  // String f(String x) => x;
-  // String g(String y) => f(y);
-  // ```
-  //
-  // If that fix isn't possible, then add code to handle the case where the
-  // argument value isn't the required type. One approach is to coerce other
-  // types to the required type:
-  //
-  // ```dart
-  // %language=2.9
-  // String f(String x) => x;
-  // String g(num y) => f(y.toString());
-  // ```
-  //
-  // Another approach is to add explicit type tests and fallback code:
-  //
-  // ```dart
-  // %language=2.9
-  // String f(String x) => x;
-  // String g(num y) => f(y is String ? y : '');
-  // ```
-  //
-  // If you believe that the runtime type of the argument will always be the
-  // same as the static type of the parameter, and you're willing to risk having
-  // an exception thrown at runtime if you're wrong, then add an explicit cast:
-  //
-  // ```dart
-  // String f(String x) => x;
-  // String g(num y) => f(y as String);
-  // ```
-  static const CompileTimeErrorCode ARGUMENT_TYPE_NOT_ASSIGNABLE =
-      CompileTimeErrorCode(
-          'ARGUMENT_TYPE_NOT_ASSIGNABLE',
-          "The argument type '{0}' can't be assigned to the parameter type "
-              "'{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a redirecting constructor (a
-  // constructor that redirects to another constructor in the same class) has an
-  // assert in the initializer list.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the unnamed constructor
-  // is a redirecting constructor and also has an assert in the initializer
-  // list:
-  //
-  // ```dart
-  // class C {
-  //   C(int x) : [!assert(x > 0)!], this.name();
-  //   C.name() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the assert isn't needed, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   C(int x) : this.name();
-  //   C.name() {}
-  // }
-  // ```
-  //
-  // If the assert is needed, then convert the constructor into a factory
-  // constructor:
-  //
-  // ```dart
-  // class C {
-  //   factory C(int x) {
-  //     assert(x > 0);
-  //     return C.name();
-  //   }
-  //   C.name() {}
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSERT_IN_REDIRECTING_CONSTRUCTOR =
-      CompileTimeErrorCode('ASSERT_IN_REDIRECTING_CONSTRUCTOR',
-          "A redirecting constructor can't have an 'assert' initializer.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an assignment to a
-  // top-level variable, a static field, or a local variable that has the
-  // `const` modifier. The value of a compile-time constant can't be changed at
-  // runtime.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `c` is being assigned a
-  // value even though it has the `const` modifier:
-  //
-  // ```dart
-  // const c = 0;
-  //
-  // void f() {
-  //   [!c!] = 1;
-  //   print(c);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the variable must be assignable, then remove the `const` modifier:
-  //
-  // ```dart
-  // var c = 0;
-  //
-  // void f() {
-  //   c = 1;
-  //   print(c);
-  // }
-  // ```
-  //
-  // If the constant shouldn't be changed, then either remove the assignment or
-  // use a local variable in place of references to the constant:
-  //
-  // ```dart
-  // const c = 0;
-  //
-  // void f() {
-  //   var v = 1;
-  //   print(v);
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_CONST = CompileTimeErrorCode(
-      'ASSIGNMENT_TO_CONST', "Constant variables can't be assigned a value.",
-      correction: "Try removing the assignment, or "
-          "remove the modifier 'const' from the variable.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds an invocation of a
-  // setter, but there's no setter because the field with the same name was
-  // declared to be `final` or `const`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `v` is final:
-  //
-  // ```dart
-  // class C {
-  //   final v = 0;
-  // }
-  //
-  // f(C c) {
-  //   c.[!v!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to be able to set the value of the field, then remove the
-  // modifier `final` from the field:
-  //
-  // ```dart
-  // class C {
-  //   int v = 0;
-  // }
-  //
-  // f(C c) {
-  //   c.v = 1;
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL = CompileTimeErrorCode(
-      'ASSIGNMENT_TO_FINAL',
-      "'{0}' can't be used as a setter because it's final.",
-      correction: "Try finding a different setter, or making '{0}' non-final.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable that was
-  // declared to be final is assigned after it was initialized.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is final, so it
-  // can't have a value assigned to it after it was initialized:
-  //
-  // ```dart
-  // void f() {
-  //   final x = 0;
-  //   [!x!] = 3;
-  //   print(x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Remove the keyword `final`, and replace it with `var` if there's no type
-  // annotation:
-  //
-  // ```dart
-  // void f() {
-  //   var x = 0;
-  //   x = 3;
-  //   print(x);
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_LOCAL =
-      CompileTimeErrorCode('ASSIGNMENT_TO_FINAL_LOCAL',
-          "The final variable '{0}' can only be set once.",
-          correction: "Try making '{0}' non-final.", hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a reference to a setter is
-  // found; there is no setter defined for the type; but there is a getter
-  // defined with the same name.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because there is no setter
-  // named `x` in `C`, but there is a getter named `x`:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.[!x!] = 1;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you want to invoke an existing setter, then correct the name:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.y = 1;
-  // }
-  // ```
-  //
-  // If you want to invoke the setter but it just doesn't exist yet, then
-  // declare it:
-  //
-  // ```dart
-  // class C {
-  //   int get x => 0;
-  //   set x(int p) {}
-  //   set y(int p) {}
-  // }
-  //
-  // void f(C c) {
-  //   c.x = 1;
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_FINAL_NO_SETTER =
-      CompileTimeErrorCode('ASSIGNMENT_TO_FINAL_NO_SETTER',
-          "There isn’t a setter named '{0}' in class '{1}'.",
-          correction:
-              "Try correcting the name to reference an existing setter, or "
-              "declare the setter.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a function appears
-  // on the left-hand side of an assignment expression.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the assignment to the
-  // function `f` is invalid:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   [!f!] = () {};
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the right-hand side should be assigned to something else, such as a
-  // local variable, then change the left-hand side:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   var x = () {};
-  //   print(x);
-  // }
-  // ```
-  //
-  // If the intent is to change the implementation of the function, then define
-  // a function-valued variable instead of a function:
-  //
-  // ```dart
-  // void Function() f = () {};
-  //
-  // void g() {
-  //   f = () {};
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_FUNCTION =
-      CompileTimeErrorCode(
-          'ASSIGNMENT_TO_FUNCTION', "Functions can't be assigned a value.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the target of an assignment is a
-  // method.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` can't be assigned a
-  // value because it's a method:
-  //
-  // ```dart
-  // class C {
-  //   void f() {}
-  //
-  //   void g() {
-  //     [!f!] = null;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rewrite the code so that there isn't an assignment to a method.
-  static const CompileTimeErrorCode ASSIGNMENT_TO_METHOD = CompileTimeErrorCode(
-      'ASSIGNMENT_TO_METHOD', "Methods can't be assigned a value.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name of a type name appears
-  // on the left-hand side of an assignment expression.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the assignment to the
-  // class `C` is invalid:
-  //
-  // ```dart
-  // class C {}
-  //
-  // void f() {
-  //   [!C!] = null;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the right-hand side should be assigned to something else, such as a
-  // local variable, then change the left-hand side:
-  //
-  // ```dart
-  // void f() {}
-  //
-  // void g() {
-  //   var c = null;
-  //   print(c);
-  // }
-  // ```
-  static const CompileTimeErrorCode ASSIGNMENT_TO_TYPE = CompileTimeErrorCode(
-      'ASSIGNMENT_TO_TYPE', "Types can't be assigned a value.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an async for-in loop is found in
-  // a function or method whose body isn't marked as being either `async` or
-  // `async*`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the body of `f` isn't
-  // marked as being either `async` or `async*`, but `f` contains an async
-  // for-in loop:
-  //
-  // ```dart
-  // void f(list) {
-  //   await for (var e [!in!] list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the function should return a `Future`, then mark the body with `async`:
-  //
-  // ```dart
-  // Future<void> f(list) async {
-  //   await for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // If the function should return a `Stream` of values, then mark the body with
-  // `async*`:
-  //
-  // ```dart
-  // Stream<void> f(list) async* {
-  //   await for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  //
-  // If the function should be synchronous, then remove the `await` before the
-  // loop:
-  //
-  // ```dart
-  // void f(list) {
-  //   for (var e in list) {
-  //     print(e);
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode ASYNC_FOR_IN_WRONG_CONTEXT =
-      CompileTimeErrorCode('ASYNC_FOR_IN_WRONG_CONTEXT',
-          "The async for-in loop can only be used in an async function.",
-          correction:
-              "Try marking the function body with either 'async' or 'async*', "
-              "or removing the 'await' before the for-in loop.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a local variable that has the
-  // `late` modifier uses an `await` expression in the initializer.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because an `await` expression
-  // is used in the initializer for `v`, a local variable that is marked `late`:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   late var v = [!await!] 42;
-  //   return v;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the initializer can be rewritten to not use `await`, then rewrite it:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   late var v = 42;
-  //   return v;
-  // }
-  // ```
-  //
-  // If the initializer can't be rewritten, then remove the `late` modifier:
-  //
-  // ```dart
-  // Future<int> f() async {
-  //   var v = await 42;
-  //   return v;
-  // }
-  // ```
-  static const CompileTimeErrorCode AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER =
-      CompileTimeErrorCode(
-          'AWAIT_IN_LATE_LOCAL_VARIABLE_INITIALIZER',
-          "The 'await' expression can't be used in a 'late' local variable's "
-              "initializer.",
-          correction:
-              "Try removing the 'late' modifier, or rewriting the initializer "
-              "without using the 'await' expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * 16.30 Await Expressions: It is a compile-time error if the function
-   * immediately enclosing _a_ is not declared asynchronous. (Where _a_ is the
-   * await expression.)
-   */
-  static const CompileTimeErrorCode AWAIT_IN_WRONG_CONTEXT =
-      CompileTimeErrorCode('AWAIT_IN_WRONG_CONTEXT',
-          "The await expression can only be used in an async function.",
-          correction:
-              "Try marking the function body with either 'async' or 'async*'.");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a method or function has a
-  // return type that's [potentially non-nullable][] but would implicitly return
-  // `null` if control reached the end of the function.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the method `m` has an
-  // implicit return of `null` inserted at the end of the method, but the method
-  // is declared to not return `null`:
-  //
-  // ```dart
-  // class C {
-  //   int [!m!](int t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the method `m` has an
-  // implicit return of `null` inserted at the end of the method, but because
-  // the class `C` can be instantiated with a non-nullable type argument, the
-  // method is effectively declared to not return `null`:
-  //
-  // ```dart
-  // class C<T> {
-  //   T [!m!](T t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there's a reasonable value that can be returned, then add a `return`
-  // statement at the end of the method:
-  //
-  // ```dart
-  // class C<T> {
-  //   T m(T t) {
-  //     print(t);
-  //     return t;
-  //   }
-  // }
-  // ```
-  //
-  // If the method won't reach the implicit return, then add a `throw` at the
-  // end of the method:
-  //
-  // ```dart
-  // class C<T> {
-  //   T m(T t) {
-  //     print(t);
-  //     throw '';
-  //   }
-  // }
-  // ```
-  //
-  // If the method intentionally returns `null` at the end, then change the
-  // return type so that it's valid to return `null`:
-  //
-  // ```dart
-  // class C<T> {
-  //   T? m(T t) {
-  //     print(t);
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode BODY_MIGHT_COMPLETE_NORMALLY =
-      CompileTimeErrorCode(
-          'BODY_MIGHT_COMPLETE_NORMALLY',
-          "The body might complete normally, causing 'null' to be returned, "
-              "but the return type is a potentially non-nullable type.",
-          correction:
-              "Try adding either a return or a throw statement at the end.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a break in a case clause inside
-  // a switch statement has a label that is associated with another case clause.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the label `l` is
-  // associated with the case clause for `0`:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     l: case 0:
-  //       break;
-  //     case 1:
-  //       break [!l!];
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the intent is to transfer control to the statement after the switch,
-  // then remove the label from the break statement:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     case 0:
-  //       break;
-  //     case 1:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the intent is to transfer control to a different case block, then use
-  // `continue` rather than `break`:
-  //
-  // ```dart
-  // void f(int i) {
-  //   switch (i) {
-  //     l: case 0:
-  //       break;
-  //     case 1:
-  //       continue l;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
-      CompileTimeErrorCode('BREAK_LABEL_ON_SWITCH_MEMBER',
-          "A break label resolves to the 'case' or 'default' statement.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name used in the declaration
-  // of a class, extension, mixin, typedef, type parameter, or import prefix is
-  // a built-in identifier. Built-in identifiers can’t be used to name any of
-  // these kinds of declarations.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `mixin` is a built-in
-  // identifier:
-  //
-  // ```dart
-  // extension [!mixin!] on int {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Choose a different name for the declaration.
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as an extension name.",
-          correction: "Try choosing a different name for the extension.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_PREFIX_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a prefix name.",
-          correction: "Try choosing a different name for the prefix.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_PREFIX_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a built-in identifier is used
-  // where a type name is expected.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `import` can't be used
-  // as a type because it's a built-in identifier:
-  //
-  // ```dart
-  // [!import!]<int> x;
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the built-in identifier with the name of a valid type:
-  //
-  // ```dart
-  // List<int> x;
-  // ```
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_AS_TYPE',
-          "The built-in identifier '{0}' can't be used as a type.",
-          correction: "Try correcting the name to match an existing type.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a type name.",
-          correction: "Try choosing a different name for the type.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME =
-      CompileTimeErrorCode(
-          'BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a type parameter "
-              "name.",
-          correction: "Try choosing a different name for the type parameter.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME');
-
-  /**
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME =
-      CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a typedef name.",
-          correction: "Try choosing a different name for the typedef.",
-          hasPublishedDocs: true,
-          uniqueName: 'BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME');
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the last statement in a `case`
-  // block isn't one of the required terminators: `break`, `continue`,
-  // `rethrow`, `return`, or `throw`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the `case` block ends
-  // with an assignment:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int x) {
-  //   switch (x) {
-  //     [!case!] 0:
-  //       x += 2;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add one of the required terminators:
-  //
-  // ```dart
-  // %language=2.9
-  // void f(int x) {
-  //   switch (x) {
-  //     case 0:
-  //       x += 2;
-  //       break;
-  //     default:
-  //       x += 1;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode CASE_BLOCK_NOT_TERMINATED =
-      CompileTimeErrorCode(
-          'CASE_BLOCK_NOT_TERMINATED',
-          "The last statement of the 'case' should be 'break', 'continue', "
-              "'rethrow', 'return', or 'throw'.",
-          correction: "Try adding one of the required statements.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the this of the switch case expression
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the type of the expression
-  // following the keyword `case` has an implementation of the `==` operator
-  // other than the one in `Object`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the expression
-  // following the keyword `case` (`C(0)`) has the type `C`, and the class `C`
-  // overrides the `==` operator:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   switch (c) {
-  //     case [!C(0)!]:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If there isn't a strong reason not to do so, then rewrite the code to use
-  // an if-else structure:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   if (c == C(0)) {
-  //     // ...
-  //   }
-  // }
-  // ```
-  //
-  // If you can't rewrite the switch statement and the implementation of `==`
-  // isn't necessary, then remove it:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  // }
-  //
-  // void f(C c) {
-  //   switch (c) {
-  //     case C(0):
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If you can't rewrite the switch statement and you can't remove the
-  // definition of `==`, then find some other value that can be used to control
-  // the switch:
-  //
-  // ```dart
-  // class C {
-  //   final int value;
-  //
-  //   const C(this.value);
-  //
-  //   bool operator ==(Object other) {
-  //     return false;
-  //   }
-  // }
-  //
-  // void f(C c) {
-  //   switch (c.value) {
-  //     case 0:
-  //       break;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS =
-      CompileTimeErrorCode(
-          'CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
-          "The switch case expression type '{0}' can't override the '==' "
-              "operator.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the case expression
-   * 1: the type of the switch expression
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression following `case`
-  // in a `switch` statement has a static type that isn't a subtype of the
-  // static type of the expression following `switch`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `1` is an `int`, which
-  // isn't a subtype of `String` (the type of `s`):
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch (s) {
-  //     case [!1!]:
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value of the `case` expression is wrong, then change the `case`
-  // expression so that it has the required type:
-  //
-  // ```dart
-  // void f(String s) {
-  //   switch (s) {
-  //     case '1':
-  //       break;
-  //   }
-  // }
-  // ```
-  //
-  // If the value of the `case` expression is correct, then change the `switch`
-  // expression to have the required type:
-  //
-  // ```dart
-  // void f(int s) {
-  //   switch (s) {
-  //     case 1:
-  //       break;
-  //   }
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE =
-      CompileTimeErrorCode(
-          'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
-          "The switch case expression type '{0}' must be a subtype of the "
-              "switch expression type '{1}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the name following the `as` in a
-  // cast expression is defined to be something other than a type.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` is a variable, not
-  // a type:
-  //
-  // ```dart
-  // num x = 0;
-  // int y = x as [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Replace the name with the name of a type:
-  //
-  // ```dart
-  // num x = 0;
-  // int y = x as int;
-  // ```
-  static const CompileTimeErrorCode CAST_TO_NON_TYPE = CompileTimeErrorCode(
-      'CAST_TO_NON_TYPE',
-      "The name '{0}' isn't a type, so it can't be used in an 'as' expression.",
-      correction: "Try changing the name to the name of an existing type, or "
-          "creating a type with the name '{0}'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The instance member '{0}' can't be accessed on a class "
-              "instantiation.",
-          correction:
-              "Try changing the member name to the name of a constructor.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_INSTANCE_MEMBER');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The static member '{0}' can't be accessed on a class instantiation.",
-          correction: "Try removing the type arguments from the class name, or "
-              "changing the member name to the name of a constructor.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_STATIC_MEMBER');
-
-  /**
-   * Parameters:
-   * 0: the name of the member
-   */
-  static const CompileTimeErrorCode
-      CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER = CompileTimeErrorCode(
-          'CLASS_INSTANTIATION_ACCESS_TO_MEMBER',
-          "The class '{0} doesn't have a constructor named '{1}.",
-          correction: "Try invoking a different constructor, or defining a "
-              "constructor named '{1}'.",
-          uniqueName: 'CLASS_INSTANTIATION_ACCESS_TO_UNKNOWN_MEMBER');
-
-  /**
-   * Parameters:
-   * 0: the name of the abstract method
-   * 1: the name of the enclosing class
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a member of a concrete class is
-  // found that doesn't have a concrete implementation. Concrete classes aren't
-  // allowed to contain abstract members.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `m` is an abstract
-  // method but `C` isn't an abstract class:
-  //
-  // ```dart
-  // class C {
-  //   [!void m();!]
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's valid to create instances of the class, provide an implementation
-  // for the member:
-  //
-  // ```dart
-  // class C {
-  //   void m() {}
-  // }
-  // ```
-  //
-  // If it isn't valid to create instances of the class, mark the class as being
-  // abstract:
-  //
-  // ```dart
-  // abstract class C {
-  //   void m();
-  // }
-  // ```
-  static const CompileTimeErrorCode CONCRETE_CLASS_WITH_ABSTRACT_MEMBER =
-      CompileTimeErrorCode('CONCRETE_CLASS_WITH_ABSTRACT_MEMBER',
-          "'{0}' must have a method body because '{1}' isn't abstract.",
-          correction: "Try making '{1}' abstract, or adding a body to '{0}'.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a named constructor and either a
-  // static method or static field have the same name. Both are accessed using
-  // the name of the class, so having the same name makes the reference
-  // ambiguous.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the static field `foo`
-  // and the named constructor `foo` have the same name:
-  //
-  // ```dart
-  // class C {
-  //   C.[!foo!]();
-  //   static int foo = 0;
-  // }
-  // ```
-  //
-  // The following code produces this diagnostic because the static method `foo`
-  // and the named constructor `foo` have the same name:
-  //
-  // ```dart
-  // class C {
-  //   C.[!foo!]();
-  //   static void foo() {}
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the member or the constructor.
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static field "
-              "in this class.",
-          correction: "Try renaming either the constructor or the field.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and getter
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static getter "
-              "in this class.",
-          correction: "Try renaming either the constructor or the getter.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_GETTER');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static method "
-              "in this class.",
-          correction: "Try renaming either the constructor or the method.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD');
-
-  /**
-   * Parameters:
-   * 0: the name of the constructor and setter
-   */
-  static const CompileTimeErrorCode CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER =
-      CompileTimeErrorCode(
-          'CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER',
-          "'{0}' can't be used to name both a constructor and a static setter "
-              "in this class.",
-          correction: "Try renaming either the constructor or the setter.",
-          hasPublishedDocs: true,
-          uniqueName: 'CONFLICTING_CONSTRUCTOR_AND_STATIC_SETTER');
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a getter or a setter with basename `n`, and has a
-   * method named `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting field
-   * 1: the name of the conflicting field
-   * 2: the name of the class defining the method with which the field conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_FIELD_AND_METHOD =
-      CompileTimeErrorCode(
-          'CONFLICTING_FIELD_AND_METHOD',
-          "Class '{0}' can't define field '{1}' and have method '{2}.{1}' "
-              "with the same name.",
-          correction: "Try converting the getter to a method, or "
-              "renaming the field to a name that doesn't conflict.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type parameter
-   * 1: detail text explaining why the type could not be inferred
-   */
-  static const CompileTimeErrorCode COULD_NOT_INFER = CompileTimeErrorCode(
-      'COULD_NOT_INFER', "Couldn't infer type parameter '{0}'.{1}");
-
-  /**
-   * Parameters:
-   * 0: the name of the class implementing the conflicting interface
-   * 1: the first conflicting type
-   * 2: the second conflicting type
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class attempts to implement a
-  // generic interface multiple times, and the values of the type arguments
-  // aren't the same.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because `C` is defined to
-  // implement both `I<int>` (because it extends `A`) and `I<String>` (because
-  // it implements`B`), but `int` and `String` aren't the same type:
-  //
-  // ```dart
-  // class I<T> {}
-  // class A implements I<int> {}
-  // class B implements I<String> {}
-  // class [!C!] extends A implements B {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rework the type hierarchy to avoid this situation. For example, you might
-  // make one or both of the inherited types generic so that `C` can specify the
-  // same type for both type arguments:
-  //
-  // ```dart
-  // class I<T> {}
-  // class A<S> implements I<S> {}
-  // class B implements I<String> {}
-  // class C extends A<String> implements B {}
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_GENERIC_INTERFACES =
-      CompileTimeErrorCode(
-          'CONFLICTING_GENERIC_INTERFACES',
-          "The class '{0}' can't implement both '{1}' and '{2}' because the "
-              "type arguments are different.",
-          hasPublishedDocs: true);
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a method named `n`, and has a getter or a setter
-   * with basename `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting method
-   * 1: the name of the conflicting method
-   * 2: the name of the class defining the field with which the method conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
-      CompileTimeErrorCode(
-          'CONFLICTING_METHOD_AND_FIELD',
-          "Class '{0}' can't define method '{1}' and have field '{2}.{1}' "
-              "with the same name.",
-          correction: "Try converting the method to a getter, or "
-              "renaming the method to a name that doesn't conflict.");
-
-  /**
-   * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
-   * error if `C` declares a static member with basename `n`, and has an
-   * instance member with basename `n`.
-   *
-   * Parameters:
-   * 0: the name of the class defining the conflicting member
-   * 1: the name of the conflicting static member
-   * 2: the name of the class defining the field with which the method conflicts
-   */
-  static const CompileTimeErrorCode CONFLICTING_STATIC_AND_INSTANCE =
-      CompileTimeErrorCode(
-          'CONFLICTING_STATIC_AND_INSTANCE',
-          "Class '{0}' can't define static member '{1}' and have instance "
-              "member '{2}.{1}' with the same name.",
-          correction:
-              "Try renaming the member to a name that doesn't conflict.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class, mixin, or extension
-  // declaration declares a type parameter with the same name as the class,
-  // mixin, or extension that declares it.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `C`
-  // has the same name as the class `C` of which it's a part:
-  //
-  // ```dart
-  // class C<[!C!]> {}
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the type parameter, or the class, mixin, or extension:
-  //
-  // ```dart
-  // class C<T> {}
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the class in "
-        "which the type variable is defined.",
-    correction: "Try renaming either the type variable or the class.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_EXTENSION =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the extension "
-        "in which the type variable is defined.",
-    correction: "Try renaming either the type variable or the extension.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_EXTENSION',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class, mixin, or extension
-  // declaration declares a type parameter with the same name as one of the
-  // members of the class, mixin, or extension that declares it.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // has the same name as the field `T`:
-  //
-  // ```dart
-  // class C<[!T!]> {
-  //   int T = 0;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Rename either the type parameter or the member with which it conflicts:
-  //
-  // ```dart
-  // class C<T> {
-  //   int total = 0;
-  // }
-  // ```
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this class.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_CLASS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this mixin.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_MIXIN',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode
-      CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION = CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
-    "'{0}' can't be used to name both a type variable and a member in "
-        "this extension.",
-    correction: "Try renaming either the type variable or the member.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MEMBER_EXTENSION',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the type variable
-   */
-  static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MIXIN =
-      CompileTimeErrorCode(
-    'CONFLICTING_TYPE_VARIABLE_AND_CONTAINER',
-    "'{0}' can't be used to name both a type variable and the mixin in "
-        "which the type variable is defined.",
-    correction: "Try renaming either the type variable or the mixin.",
-    hasPublishedDocs: true,
-    uniqueName: 'CONFLICTING_TYPE_VARIABLE_AND_MIXIN',
-  );
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH =
-      CompileTimeErrorCode(
-    'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
-    "In a const constructor, a value of type '{0}' can't be assigned to the "
-        "field '{1}', which has type '{2}'.",
-    correction: "Try using a subtype, or removing the keyword 'const'.",
-  );
-
-  /**
-   * Parameters:
-   * 0: the type of the runtime value of the argument
-   * 1: the static type of the parameter
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the runtime type of a constant
-  // value can't be assigned to the static type of a constant constructor's
-  // parameter.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the runtime type of `i`
-  // is `int`, which can't be assigned to the static type of `s`:
-  //
-  // ```dart
-  // class C {
-  //   final String s;
-  //
-  //   const C(this.s);
-  // }
-  //
-  // const dynamic i = 0;
-  //
-  // void f() {
-  //   const C([!i!]);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Pass a value of the correct type to the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final String s;
-  //
-  //   const C(this.s);
-  // }
-  //
-  // const dynamic i = 0;
-  //
-  // void f() {
-  //   const C('$i');
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH =
-      CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
-          "A value of type '{0}' can't be assigned to a parameter of type "
-              "'{1}' in a const constructor.",
-          correction: "Try using a subtype, or removing the keyword 'const'.",
-          hasPublishedDocs: true);
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION =
-      CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION',
-          "Const constructors can't throw exceptions.",
-          correction: "Try removing the throw statement, or "
-              "removing the keyword 'const'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the field
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor has the keyword
-  // `const`, but a field in the class is initialized to a non-constant value.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the field `s` is
-  // initialized to a non-constant value:
-  //
-  // ```dart
-  // class C {
-  //   final String s = 3.toString();
-  //   [!const!] C();
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field can be initialized to a constant value, then change the
-  // initializer to a constant expression:
-  //
-  // ```dart
-  // class C {
-  //   final String s = '3';
-  //   const C();
-  // }
-  // ```
-  //
-  // If the field can't be initialized to a constant value, then remove the
-  // keyword `const` from the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final String s = 3.toString();
-  //   C();
-  // }
-  // ```
-  static const CompileTimeErrorCode
-      CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST =
-      CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
-          "Can't define the 'const' constructor because the field '{0}' is "
-              "initialized with a non-constant value.",
-          correction: "Try initializing the field to a constant value, or "
-              "removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
-   * or implicitly, in the initializer list of a constant constructor must
-   * specify a constant constructor of the superclass of the immediately
-   * enclosing class or a compile-time error occurs.
-   *
-   * 12.1 Mixin Application: For each generative constructor named ... an
-   * implicitly declared constructor named ... is declared. If Sq is a
-   * generative const constructor, and M does not declare any fields, Cq is
-   * also a const constructor.
-   *
-   * Parameters:
-   * 0: the name of the instance field.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD =
-      CompileTimeErrorCode(
-    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-    "This constructor can't be declared 'const' because a mixin adds the "
-        "instance field: {0}.",
-    correction: "Try removing the 'const' keyword or removing the 'with' "
-        "clause from the class declaration, or removing the field from "
-        "the mixin class.",
-    uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-  );
-
-  /**
-   * 7.6.3 Constant Constructors: The superinitializer that appears, explicitly
-   * or implicitly, in the initializer list of a constant constructor must
-   * specify a constant constructor of the superclass of the immediately
-   * enclosing class or a compile-time error occurs.
-   *
-   * 12.1 Mixin Application: For each generative constructor named ... an
-   * implicitly declared constructor named ... is declared. If Sq is a
-   * generative const constructor, and M does not declare any fields, Cq is
-   * also a const constructor.
-   *
-   * Parameters:
-   * 0: the names of the instance fields.
-   */
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS =
-      CompileTimeErrorCode(
-    'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
-    "This constructor can't be declared 'const' because the mixins add "
-        "the instance fields: {0}.",
-    correction: "Try removing the 'const' keyword or removing the 'with' "
-        "clause from the class declaration, or removing the fields from "
-        "the mixin classes.",
-    uniqueName: 'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELDS',
-  );
-
-  /**
-   * Parameters:
-   * 0: the name of the superclass
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor that is marked as
-  // `const` invokes a constructor from its superclass that isn't marked as
-  // `const`.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the `const` constructor
-  // in `B` invokes the constructor `nonConst` from the class `A`, and the
-  // superclass constructor isn't a `const` constructor:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : [!super.nonConst()!];
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it isn't essential to invoke the superclass constructor that is
-  // currently being invoked, then invoke a constant constructor from the
-  // superclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : super();
-  // }
-  // ```
-  //
-  // If it's essential that the current constructor be invoked and if you can
-  // modify it, then add `const` to the constructor in the superclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   const A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   const B() : super.nonConst();
-  // }
-  // ```
-  //
-  // If it's essential that the current constructor be invoked and you can't
-  // modify it, then remove `const` from the constructor in the subclass:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  //   A.nonConst();
-  // }
-  //
-  // class B extends A {
-  //   B() : super.nonConst();
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
-      CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
-          "A constant constructor can't call a non-constant super constructor "
-              "of '{0}'.",
-          correction: "Try calling a constant constructor in the superclass, "
-              "or removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a constructor is marked as a
-  // const constructor, but the constructor is defined in a class that has at
-  // least one non-final instance field (either directly or by inheritance).
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the field `x` isn't
-  // final:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   const [!C!](this.x);
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's possible to mark all of the fields as final, then do so:
-  //
-  // ```dart
-  // class C {
-  //   final int x;
-  //
-  //   const C(this.x);
-  // }
-  // ```
-  //
-  // If it isn't possible to mark all of the fields as final, then remove the
-  // keyword `const` from the constructor:
-  //
-  // ```dart
-  // class C {
-  //   int x;
-  //
-  //   C(this.x);
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD =
-      CompileTimeErrorCode('CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD',
-          "Can't define a const constructor for a class with non-final fields.",
-          correction: "Try making all of the fields final, or "
-              "removing the keyword 'const' from the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a class from a library that is
-  // imported using a deferred import is used to create a `const` object.
-  // Constants are evaluated at compile time, and classes from deferred
-  // libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because it attempts to create a
-  // `const` instance of a class from a deferred library:
-  //
-  // ```dart
-  // import 'dart:convert' deferred as convert;
-  //
-  // const json2 = [!convert.JsonCodec()!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the object isn't required to be a constant, then change the code so that
-  // a non-constant instance is created:
-  //
-  // ```dart
-  // import 'dart:convert' deferred as convert;
-  //
-  // final json2 = convert.JsonCodec();
-  // ```
-  //
-  // If the object must be a constant, then remove `deferred` from the import
-  // directive:
-  //
-  // ```dart
-  // import 'dart:convert' as convert;
-  //
-  // const json2 = convert.JsonCodec();
-  // ```
-  static const CompileTimeErrorCode CONST_DEFERRED_CLASS = CompileTimeErrorCode(
-      'CONST_DEFERRED_CLASS', "Deferred classes can't be created with 'const'.",
-      correction: "Try using 'new' to create the instance, or "
-          "changing the import to not be deferred.",
-      hasPublishedDocs: true);
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
-      CompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION',
-          "Evaluation of this constant expression throws an exception.");
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if evaluation of a constant
-   * object results in an uncaught exception being thrown.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_THROWS_IDBZE =
-      CompileTimeErrorCode(
-          'CONST_EVAL_THROWS_IDBZE',
-          "Evaluation of this constant expression throws an "
-              "IntegerDivisionByZeroException.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
-   * where e, e1 and e2 are constant expressions that evaluate to a boolean
-   * value.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_BOOL',
-      "In constant expressions, operands of this operator must be of type "
-          "'bool'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
-   * where e, e1 and e2 are constant expressions that evaluate to a boolean
-   * value.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_INT =
-      CompileTimeErrorCode(
-          'CONST_EVAL_TYPE_BOOL_INT',
-          "In constant expressions, operands of this operator must be of type "
-              "'bool' or 'int'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
-   * e1 and e2 are constant expressions that evaluate to a numeric, string or
-   * boolean value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_BOOL_NUM_STRING =
-      CompileTimeErrorCode(
-          'CONST_EVAL_TYPE_BOOL_NUM_STRING',
-          "In constant expressions, operands of this operator must be of type "
-              "'bool', 'num', 'String' or 'null'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2,
-   * e1 | e2, e1 >> e2 or e1 << e2, where e, e1 and e2 are constant expressions
-   * that evaluate to an integer value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_INT = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_INT',
-      "In constant expressions, operands of this operator must be of type "
-          "'int'.");
-
-  /**
-   * 16.12.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
-   * e2, e1 / e2, e1 ~/ e2, e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2,
-   * where e, e1 and e2 are constant expressions that evaluate to a numeric
-   * value or to null.
-   */
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_NUM = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_NUM',
-      "In constant expressions, operands of this operator must be of type "
-          "'num'.");
-
-  static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE = CompileTimeErrorCode(
-      'CONST_EVAL_TYPE_TYPE',
-      "In constant expressions, operands of this operator must be of type "
-          "'Type'.");
-
-  /**
-   * Parameters:
-   * 0: the name of the type of the initializer expression
-   * 1: the name of the type of the field
-   */
-  static const CompileTimeErrorCode CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE =
-      CompileTimeErrorCode(
-    'FIELD_INITIALIZER_NOT_ASSIGNABLE',
-    "The initializer type '{0}' can't be assigned to the field type "
-        "'{1}' in a const constructor.",
-    correction: "Try using a subtype, or removing the 'const' keyword",
-    hasPublishedDocs: true,
-    uniqueName: 'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a value that isn't statically
-  // known to be a constant is assigned to a variable that's declared to be a
-  // `const` variable.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `x` isn't declared to
-  // be `const`:
-  //
-  // ```dart
-  // var x = 0;
-  // const y = [!x!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the value being assigned can be declared to be `const`, then change the
-  // declaration:
-  //
-  // ```dart
-  // const x = 0;
-  // const y = x;
-  // ```
-  //
-  // If the value can't be declared to be `const`, then remove the `const`
-  // modifier from the variable, possibly using `final` in its place:
-  //
-  // ```dart
-  // var x = 0;
-  // final y = x;
-  // ```
-  static const CompileTimeErrorCode CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE =
-      CompileTimeErrorCode('CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE',
-          "Const variables must be initialized with a constant value.",
-          correction:
-              "Try changing the initializer to be a constant expression.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a `const` variable is
-  // initialized using a `const` variable from a library that is imported using
-  // a deferred import. Constants are evaluated at compile time, and values from
-  // deferred libraries aren't available at compile time.
-  //
-  // For more information, see the language tour's coverage of
-  // [deferred loading](https://dart.dev/guides/language/language-tour#lazily-loading-a-library).
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the variable `pi` is
-  // being initialized using the constant `math.pi` from the library
-  // `dart:math`, and `dart:math` is imported as a deferred library:
-  //
-  // ```dart
-  // import 'dart:math' deferred as math;
-  //
-  // const pi = [!math.pi!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you need to reference the value of the constant from the imported
-  // library, then remove the keyword `deferred`:
-  //
-  // ```dart
-  // import 'dart:math' as math;
-  //
-  // const pi = math.pi;
-  // ```
-  //
-  // If you don't need to reference the imported constant, then remove the
-  // reference:
-  //
-  // ```dart
-  // const pi = 3.14;
-  // ```
-  static const CompileTimeErrorCode
-      CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
-      CompileTimeErrorCode(
-          'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used to initialize "
-              "a 'const' variable.",
-          correction:
-              "Try initializing the variable without referencing members of "
-              "the deferred library, or changing the import to not be "
-              "deferred.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when an instance field is marked as
-  // being const.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `f` is an instance
-  // field:
-  //
-  // ```dart
-  // class C {
-  //   [!const!] int f = 3;
-  // }
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the field needs to be an instance field, then remove the keyword
-  // `const`, or replace it with `final`:
-  //
-  // ```dart
-  // class C {
-  //   final int f = 3;
-  // }
-  // ```
-  //
-  // If the field really should be a const field, then make it a static field:
-  //
-  // ```dart
-  // class C {
-  //   static const int f = 3;
-  // }
-  // ```
-  static const CompileTimeErrorCode CONST_INSTANCE_FIELD = CompileTimeErrorCode(
-      'CONST_INSTANCE_FIELD', "Only static fields can be declared as const.",
-      correction: "Try declaring the field as final, or adding the keyword "
-          "'static'.",
-      hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the entry's key
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class of object used as a
-  // key in a constant map literal implements the `==` operator. The
-  // implementation of constant maps uses the `==` operator, so any
-  // implementation other than the one inherited from `Object` requires
-  // executing arbitrary code at compile time, which isn't supported.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constant map
-  // contains a key whose type is `C`, and the class `C` overrides the
-  // implementation of `==`:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // const map = {[!C()!] : 0};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you can remove the implementation of `==` from the class, then do so:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // const map = {C() : 0};
-  // ```
-  //
-  // If you can't remove the implementation of `==` from the class, then make
-  // the map be non-constant:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // final map = {C() : 0};
-  // ```
-  static const CompileTimeErrorCode
-      CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = CompileTimeErrorCode(
-          'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
-          "The type of a key in a constant map can't override the '==' "
-              "operator, but the class '{0}' does.",
-          correction: "Try using a different value for the key, or "
-              "removing the keyword 'const' from the map.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the uninitialized final variable
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a variable that is declared to
-  // be a constant doesn't have an initializer.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `c` isn't initialized:
-  //
-  // ```dart
-  // const [!c!];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Add an initializer:
-  //
-  // ```dart
-  // const c = 'c';
-  // ```
-  static const CompileTimeErrorCode CONST_NOT_INITIALIZED =
-      CompileTimeErrorCode(
-          'CONST_NOT_INITIALIZED', "The constant '{0}' must be initialized.",
-          correction: "Try adding an initialization to the declaration.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the type of the element
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the class of object used as an
-  // element in a constant set literal implements the `==` operator. The
-  // implementation of constant sets uses the `==` operator, so any
-  // implementation other than the one inherited from `Object` requires
-  // executing arbitrary code at compile time, which isn't supported.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the constant set
-  // contains an element whose type is `C`, and the class `C` overrides the
-  // implementation of `==`:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // const set = {[!C()!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If you can remove the implementation of `==` from the class, then do so:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  // }
-  //
-  // const set = {C()};
-  // ```
-  //
-  // If you can't remove the implementation of `==` from the class, then make
-  // the set be non-constant:
-  //
-  // ```dart
-  // class C {
-  //   const C();
-  //
-  //   bool operator ==(Object other) => true;
-  // }
-  //
-  // final set = {C()};
-  // ```
-  static const CompileTimeErrorCode CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS =
-      CompileTimeErrorCode(
-          'CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS',
-          "The type of an element in a constant set can't override the '==' "
-              "operator, but the type '{0}' does.",
-          correction: "Try using a different value for the element, or "
-              "removing the keyword 'const' from the set.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression of a spread
-  // operator in a constant list or set evaluates to something other than a list
-  // or a set.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `list1` is
-  // `null`, which is neither a list nor a set:
-  //
-  // ```dart
-  // %language=2.9
-  // const List<int> list1 = null;
-  // const List<int> list2 = [...[!list1!]];
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the expression to something that evaluates to either a constant list
-  // or a constant set:
-  //
-  // ```dart
-  // %language=2.9
-  // const List<int> list1 = [];
-  // const List<int> list2 = [...list1];
-  // ```
-  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_LIST_OR_SET =
-      CompileTimeErrorCode('CONST_SPREAD_EXPECTED_LIST_OR_SET',
-          "A list or a set is expected in this spread.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the expression of a spread
-  // operator in a constant map evaluates to something other than a map.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the value of `map1` is
-  // `null`, which isn't a map:
-  //
-  // ```dart
-  // %language=2.9
-  // const Map<String, int> map1 = null;
-  // const Map<String, int> map2 = {...[!map1!]};
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Change the expression to something that evaluates to a constant map:
-  //
-  // ```dart
-  // %language=2.9
-  // const Map<String, int> map1 = {};
-  // const Map<String, int> map2 = {...map1};
-  // ```
-  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_MAP =
-      CompileTimeErrorCode(
-          'CONST_SPREAD_EXPECTED_MAP', "A map is expected in this spread.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when the keyword `const` is used to
-  // invoke a constructor that isn't marked with `const`.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because the constructor in `A`
-  // isn't a const constructor:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // A f() => [!const!] A();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If it's desirable and possible to make the class a constant class (by
-  // making all of the fields of the class, including inherited fields, final),
-  // then add the keyword `const` to the constructor:
-  //
-  // ```dart
-  // class A {
-  //   const A();
-  // }
-  //
-  // A f() => const A();
-  // ```
-  //
-  // Otherwise, remove the keyword `const`:
-  //
-  // ```dart
-  // class A {
-  //   A();
-  // }
-  //
-  // A f() => A();
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_NON_CONST = CompileTimeErrorCode(
-      'CONST_WITH_NON_CONST',
-      "The constructor being called isn't a const constructor.",
-      correction: "Try removing 'const' from the constructor invocation.",
-      hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a const constructor is invoked
-  // with an argument that isn't a constant expression.
-  //
-  // #### Examples
-  //
-  // The following code produces this diagnostic because `i` isn't a constant:
-  //
-  // ```dart
-  // class C {
-  //   final int i;
-  //   const C(this.i);
-  // }
-  // C f(int i) => const C([!i!]);
-  // ```
-  //
-  // #### Common fixes
-  //
-  // Either make all of the arguments constant expressions, or remove the
-  // `const` keyword to use the non-constant form of the constructor:
-  //
-  // ```dart
-  // class C {
-  //   final int i;
-  //   const C(this.i);
-  // }
-  // C f(int i) => C(i);
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_NON_CONSTANT_ARGUMENT =
-      CompileTimeErrorCode('CONST_WITH_NON_CONSTANT_ARGUMENT',
-          "Arguments of a constant creation must be constant expressions.",
-          correction: "Try making the argument a valid constant, or "
-              "use 'new' to call the constructor.",
-          hasPublishedDocs: true);
-
-  /**
-   * Parameters:
-   * 0: the name of the non-type element
-   */
-  static const CompileTimeErrorCode CONST_WITH_NON_TYPE = CompileTimeErrorCode(
-    'CREATION_WITH_NON_TYPE',
-    "The name '{0}' isn't a class.",
-    correction: "Try correcting the name to match an existing class.",
-    hasPublishedDocs: true,
-    isUnresolvedIdentifier: true,
-    uniqueName: 'CONST_WITH_NON_TYPE',
-  );
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a type parameter is used as a
-  // type argument in a `const` invocation of a constructor. This isn't allowed
-  // because the value of the type parameter (the actual type that will be used
-  // at runtime) can't be known at compile time.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the type parameter `T`
-  // is being used as a type argument when creating a constant:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<T> newC<T>() => const C<[!T!]>();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If the type that will be used for the type parameter can be known at
-  // compile time, then remove the use of the type parameter:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<int> newC() => const C<int>();
-  // ```
-  //
-  // If the type that will be used for the type parameter can't be known until
-  // runtime, then remove the keyword `const`:
-  //
-  // ```dart
-  // class C<T> {
-  //   const C();
-  // }
-  //
-  // C<T> newC<T>() => C<T>();
-  // ```
-  static const CompileTimeErrorCode CONST_WITH_TYPE_PARAMETERS =
-      CompileTimeErrorCode('CONST_WITH_TYPE_PARAMETERS',
-          "A constant creation can't use a type parameter as a type argument.",
-          correction: "Try replacing the type parameter with a different type.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF = CompileTimeErrorCode(
-          'CONST_WITH_TYPE_PARAMETERS',
-          "A constant constructor tearoff can't use a type parameter as a type "
-              "argument.",
-          correction: "Try replacing the type parameter with a different type.",
-          uniqueName: 'CONST_WITH_TYPE_PARAMETERS_CONSTRUCTOR_TEAROFF',
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  static const CompileTimeErrorCode
-      CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF = CompileTimeErrorCode(
-          'CONST_WITH_TYPE_PARAMETERS',
-          "A constant function tearoff can't use a type parameter as a type "
-              "argument.",
-          correction: "Try replacing the type parameter with a different type.",
-          uniqueName: 'CONST_WITH_TYPE_PARAMETERS_FUNCTION_TEAROFF',
-          hasPublishedDocs: true);
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
-   * a constant constructor declared by the type <i>T</i>.
-   *
-   * Parameters:
-   * 0: the name of the type
-   * 1: the name of the requested constant constructor
-   */
-  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR =
-      CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR',
-          "The class '{0}' doesn't have a constant constructor '{1}'.",
-          correction: "Try calling a different constructor.");
-
-  /**
-   * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
-   * a constant constructor declared by the type <i>T</i>.
-   *
-   * Parameters:
-   * 0: the name of the type
-   */
-  static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
-      CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
-          "The class '{0}' doesn't have an unnamed constant constructor.",
-          correction: "Try calling a different constructor.");
-
-  static const CompileTimeErrorCode CONTINUE_LABEL_ON_SWITCH =
-      CompileTimeErrorCode('CONTINUE_LABEL_ON_SWITCH',
-          "A continue label resolves to switch, must be loop or switch member");
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when it finds a use of the default
-  // constructor for the class `List` in code that has opted in to null safety.
-  //
-  // #### Example
-  //
-  // Assuming the following code is opted in to null safety, it produces this
-  // diagnostic because it uses the default `List` constructor:
-  //
-  // ```dart
-  // var l = [!List<int>!]();
-  // ```
-  //
-  // #### Common fixes
-  //
-  // If no initial size is provided, then convert the code to use a list
-  // literal:
-  //
-  // ```dart
-  // var l = <int>[];
-  // ```
-  //
-  // If an initial size needs to be provided and there is a single reasonable
-  // initial value for the elements, then use `List.filled`:
-  //
-  // ```dart
-  // var l = List.filled(3, 0);
-  // ```
-  //
-  // If an initial size needs to be provided but each element needs to be
-  // computed, then use `List.generate`:
-  //
-  // ```dart
-  // var l = List.generate(3, (i) => i);
-  // ```
-  static const CompileTimeErrorCode DEFAULT_LIST_CONSTRUCTOR =
-      CompileTimeErrorCode(
-          'DEFAULT_LIST_CONSTRUCTOR',
-          "The default 'List' constructor isn't available when null safety is "
-              "enabled.",
-          correction: "Try using a list literal, 'List.filled' or "
-              "'List.generate'.",
-          hasPublishedDocs: true);
-
-  /**
-   * No parameters.
-   */
-  // #### Description
-  //
-  // The analyzer produces this diagnostic when a factory constructor that
-  // redirects to another constructor specifies a default value for an optional
-  // parameter.
-  //
-  // #### Example
-  //
-  // The following code produces this diagnostic because the factory constructor
-  // in `A` has a default value for the optional parameter `x`:
-  //
-  // ```dart