anchor.diff:  main() {}
   """
             ]),
  -
  -      MessageKind.READ_URI_ERROR: const MessageTemplate(
  -          MessageKind.READ_URI_ERROR, "Can't read '#{uri}' (#{exception}).",
  -          // Don't know how to fix since the underlying error is unknown.
  -          howToFix: DONT_KNOW_HOW_TO_FIX,
  -          examples: const [
  -            """
  -// 'foo.dart' does not exist.
  -import 'foo.dart';
  -
  -main() {}
  -"""
  -          ]),
  -
  -      MessageKind.READ_SELF_ERROR:
  -          const MessageTemplate(MessageKind.READ_SELF_ERROR, "#{exception}",
  -              // Don't know how to fix since the underlying error is unknown.
  -              howToFix: DONT_KNOW_HOW_TO_FIX),
  -
  -      MessageKind.ABSTRACT_CLASS_INSTANTIATION: const MessageTemplate(
  -          MessageKind.ABSTRACT_CLASS_INSTANTIATION,
  -          "Can't instantiate abstract class.",
  -          howToFix: DONT_KNOW_HOW_TO_FIX,
  -          examples: const ["abstract class A {} main() { new A(); }"]),
  -
  -      MessageKind.BODY_EXPECTED: const MessageTemplate(
  -          MessageKind.BODY_EXPECTED, "Expected a function body or '=>'.",
  -          // TODO(ahe): In some scenarios, we can suggest removing the 'static'
  -          // keyword.
  -          howToFix: "Try adding {}.",
  -          examples: const ["main();"]),
  -
  -      MessageKind.MIRROR_BLOAT: const MessageTemplate(
  -          MessageKind.MIRROR_BLOAT,
  -          "#{count} methods retained for use by dart:mirrors out of #{total}"
  -          " total methods (#{percentage}%)."),
  -
  -      MessageKind.MIRROR_IMPORT: const MessageTemplate(
  -          MessageKind.MIRROR_IMPORT, "Import of 'dart:mirrors'."),
  -
  -      MessageKind.MIRROR_IMPORT_NO_USAGE: const MessageTemplate(
  -          MessageKind.MIRROR_IMPORT_NO_USAGE,
  -          "This import is not annotated with @MirrorsUsed, which may lead to "
  -          "unnecessarily large generated code.",
  -          howToFix: "Try adding '@MirrorsUsed(...)' as described at "
  -              "https://goo.gl/Akrrog."),
   
         MessageKind.JS_PLACEHOLDER_CAPTURE: const MessageTemplate(
             MessageKind.JS_PLACEHOLDER_CAPTURE,
  
positive.code: }"""
            ]),
  
        MessageKind.BAD_INPUT_CHARACTER: const MessageTemplate(
            MessageKind.BAD_INPUT_CHARACTER,
            "Character U+#{characterHex} isn't allowed here.",
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              """
  main() {
    String x = ç;
  }
  """
            ]),
  
        MessageKind.UNTERMINATED_STRING: const MessageTemplate(
            MessageKind.UNTERMINATED_STRING, "String must end with #{quote}.",
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              """
  main() {
    return '
  ;
  }
  """,
              """
  main() {
    return \"
  ;
  }
  """,
              """
  main() {
    return r'
  ;
  }
  """,
              """
  main() {
    return r\"
  ;
  }
  """,
              """
  main() => '''
  """,
              """
  main() => \"\"\"
  """,
              """
  main() => r'''
  """,
              """
  main() => r\"\"\"
  """
            ]),
  
        MessageKind.UNMATCHED_TOKEN: const MessageTemplate(
            MessageKind.UNMATCHED_TOKEN,
            "Can't find '#{end}' to match '#{begin}'.",
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              "main(",
              "main(){",
              "main(){[}",
              // TODO(ahe): https://github.com/dart-lang/sdk/issues/28495
              // "main(){]}",
            ]),
  
        MessageKind.UNTERMINATED_TOKEN: const MessageTemplate(
            MessageKind.UNTERMINATED_TOKEN,
            // This is a fall-back message that shouldn't happen.
            "Incomplete token."),
  
        MessageKind.EXPONENT_MISSING: const MessageTemplate(
            MessageKind.EXPONENT_MISSING,
            "Numbers in exponential notation should always contain an exponent"
            " (an integer number with an optional sign).",
            howToFix: "Make sure there is an exponent, and remove any whitespace "
                "before it.",
            examples: const [
              """
  main() {
    var i = 1e;
  }
  """
            ]),
  
        MessageKind.HEX_DIGIT_EXPECTED: const MessageTemplate(
            MessageKind.HEX_DIGIT_EXPECTED,
            "A hex digit (0-9 or A-F) must follow '0x'.",
            howToFix:
                DONT_KNOW_HOW_TO_FIX, // Seems obvious from the error message.
            examples: const [
              """
  main() {
    var i = 0x;
  }
  """
            ]),
  
        MessageKind.MALFORMED_STRING_LITERAL: const MessageTemplate(
            MessageKind.MALFORMED_STRING_LITERAL,
            r"A '$' has special meaning inside a string, and must be followed by "
            "an identifier or an expression in curly braces ({}).",
            howToFix: r"Try adding a backslash (\) to escape the '$'."),
  
        MessageKind.UNTERMINATED_COMMENT: const MessageTemplate(
            MessageKind.UNTERMINATED_COMMENT,
            "Comment starting with '/*' must end with '*/'.",
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              r"""
  main() {
  }
  /*"""
            ]),
  
        MessageKind.MISSING_TOKEN_BEFORE_THIS: const MessageTemplate(
            MessageKind.MISSING_TOKEN_BEFORE_THIS,
            "Expected '#{token}' before this.",
            // Consider the second example below: the parser expects a ')' before
            // 'y', but a ',' would also have worked. We don't have enough
            // information to give a good suggestion.
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              "main() => true ? 1;",
              "main() => foo(x: 1 y: 2);",
            ]),
  
        MessageKind.MISSING_TOKEN_AFTER_THIS: const MessageTemplate(
            MessageKind.MISSING_TOKEN_AFTER_THIS,
            "Expected '#{token}' after this.",
            // See [MISSING_TOKEN_BEFORE_THIS], we don't have enough information
            // to give a good suggestion.
            howToFix: DONT_KNOW_HOW_TO_FIX,
            examples: const [
              "main(x) {x}",
              """
  class S1 {}
  class S2 {}
  class S3 {}
  class A = S1 with S2, S3
  main() => new A();
  """
            ]),
  
        MessageKind.CONSIDER_ANALYZE_ALL: const MessageTemplate(
            MessageKind.CONSIDER_ANALYZE_ALL,
            "Could not find '#{main}'.  Nothing will be analyzed.",
            howToFix: "Try using '--analyze-all' to analyze everything.",
            examples: const ['']),
  
        MessageKind.MISSING_MAIN: const MessageTemplate(
            MessageKind.MISSING_MAIN, "Could not find '#{main}'.",
            howToFix: "Try adding a method named '#{main}' to your program."
            /* No example, test uses '--analyze-only' which will produce the above
             * message [CONSIDER_ANALYZE_ALL].  An example for a human operator
             * would be an empty file.*/
            ),
  
        MessageKind.MAIN_NOT_A_FUNCTION: const MessageTemplate(
            MessageKind.MAIN_NOT_A_FUNCTION, "'#{main}' is not a function.",
            howToFix: DONT_KNOW_HOW_TO_FIX, /* Don't state the obvious. */
            examples: const ['var main;']),
  
        MessageKind.MAIN_WITH_EXTRA_PARAMETER: const MessageTemplate(
            MessageKind.MAIN_WITH_EXTRA_PARAMETER,
            "'#{main}' cannot have more than two parameters.",
            howToFix: DONT_KNOW_HOW_TO_FIX,
            /* Don't state the obvious. */
            examples: const ['main(a, b, c) {}']),
  
        MessageKind.COMPILER_CRASHED: const MessageTemplate(
            MessageKind.COMPILER_CRASHED,
            "The compiler crashed when compiling this element."),
  
negative.code: main() => new Class();
  """
            ]),
  
        MessageKind.INVALID_METADATA: const MessageTemplate(
            MessageKind.INVALID_METADATA,
  