Format doubles in messages
This simplifies including doubles in messages.
The new syntax is #num1%N.M where N is the minimum length of the
formatted number, and M is the fraction digits.
Change-Id: Ifcc12ab994363055e94ba90f7b8e6151923028fe
Reviewed-on: https://dart-review.googlesource.com/59041
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
diff --git a/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart b/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
index afe2060..bddec58 100644
--- a/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
+++ b/pkg/front_end/lib/src/fasta/builder/unresolved_type.dart
@@ -37,7 +37,7 @@
charOffset,
fileUri,
templateTypeArgumentMismatch.withArguments(
- resolvedType.name, "${declaration.typeVariablesCount}"));
+ resolvedType.name, declaration.typeVariablesCount));
}
} else if (declaration is FunctionTypeAliasBuilder) {
if (resolvedType.arguments != null &&
@@ -46,7 +46,7 @@
charOffset,
fileUri,
templateTypeArgumentMismatch.withArguments(
- resolvedType.name, "${declaration.typeVariablesCount}"));
+ resolvedType.name, declaration.typeVariablesCount));
}
}
}
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes.dart b/pkg/front_end/lib/src/fasta/fasta_codes.dart
index 6e7dbc1..05f3cde 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes.dart
@@ -159,5 +159,4 @@
return util.relativizeUri(uri, base: Uri.base);
}
-typedef Message SummaryTemplate(
- int count, int count2, String string, String string2, String string3);
+typedef SummaryTemplate = Message Function(int, int, num, num, num);
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
index 187492e..446f3fb 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -26,7 +26,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsAbstractClassInstantiation(String name) {
return new Message(codeAbstractClassInstantiation,
- message: """The class '$name' is abstract and can't be instantiated.""",
+ message: """The class '${name}' is abstract and can't be instantiated.""",
arguments: {'name': name});
}
@@ -72,7 +72,7 @@
Message _withArgumentsAbstractRedirectedClassInstantiation(String name) {
return new Message(codeAbstractRedirectedClassInstantiation,
message:
- """Factory redirects to class '$name', which is abstract and can't be instantiated.""",
+ """Factory redirects to class '${name}', which is abstract and can't be instantiated.""",
arguments: {'name': name});
}
@@ -92,7 +92,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsAccessError(String name) {
return new Message(codeAccessError,
- message: """Access error: '$name'.""", arguments: {'name': name});
+ message: """Access error: '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -123,7 +123,7 @@
String type2 = '$buffer';
return new Message(codeAmbiguousSupertypes,
- message: """'$name' can't implement both '$type' and '$type2'""",
+ message: """'${name}' can't implement both '${type}' and '${type2}'""",
arguments: {'name': name, 'type': _type, 'type2': _type2});
}
@@ -149,7 +149,7 @@
"U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}";
return new Message(codeAsciiControlCharacter,
message:
- """The control character $unicode can only be used in strings and comments.""",
+ """The control character ${unicode} can only be used in strings and comments.""",
arguments: {'codePoint': codePoint});
}
@@ -245,7 +245,8 @@
Message _withArgumentsBuiltInIdentifierAsType(Token token) {
String lexeme = token.lexeme;
return new Message(codeBuiltInIdentifierAsType,
- message: """The built-in identifier '$lexeme' can't be used as a type.""",
+ message:
+ """The built-in identifier '${lexeme}' can't be used as a type.""",
tip: """Try correcting the name to match an existing type.""",
arguments: {'token': token});
}
@@ -268,7 +269,7 @@
Message _withArgumentsBuiltInIdentifierInDeclaration(Token token) {
String lexeme = token.lexeme;
return new Message(codeBuiltInIdentifierInDeclaration,
- message: """Can't use '$lexeme' as a name here.""",
+ message: """Can't use '${lexeme}' as a name here.""",
arguments: {'token': token});
}
@@ -300,7 +301,7 @@
Message _withArgumentsCandidateFoundIsDefaultConstructor(String name) {
return new Message(codeCandidateFoundIsDefaultConstructor,
message:
- """The class '$name' has a constructor that takes no arguments.""",
+ """The class '${name}' has a constructor that takes no arguments.""",
arguments: {'name': name});
}
@@ -321,7 +322,7 @@
Message _withArgumentsCannotReadPackagesFile(String string) {
return new Message(codeCannotReadPackagesFile,
message: """Unable to read '.packages' file:
- $string.""", arguments: {'string': string});
+ ${string}.""", arguments: {'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -344,7 +345,7 @@
Message _withArgumentsCannotReadSdkSpecification(String string) {
return new Message(codeCannotReadSdkSpecification,
message: """Unable to read the 'libraries.json' specification file:
- $string.""", arguments: {'string': string});
+ ${string}.""", arguments: {'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -389,7 +390,7 @@
Message _withArgumentsCantInferTypeDueToCircularity(String string) {
return new Message(codeCantInferTypeDueToCircularity,
message:
- """Can't infer the type of '$string': circularity found during type inference.""",
+ """Can't infer the type of '${string}': circularity found during type inference.""",
tip: """Specify the type explicitly.""",
arguments: {'string': string});
}
@@ -415,7 +416,7 @@
Message _withArgumentsCantInferTypeDueToInconsistentOverrides(String string) {
return new Message(codeCantInferTypeDueToInconsistentOverrides,
message:
- """Can't infer the type of '$string': overridden members must all have the same type.""",
+ """Can't infer the type of '${string}': overridden members must all have the same type.""",
tip: """Specify the type explicitly.""",
arguments: {'string': string});
}
@@ -449,7 +450,7 @@
return new Message(codeCantUseSuperBoundedTypeForInstanceCreation,
message:
- """Can't use a super-bounded type for instance creation. Got '$type'.""",
+ """Can't use a super-bounded type for instance creation. Got '${type}'.""",
tip: """Specify a regular-bounded type instead of the super-bounded type. Note that the latter may be due to type inference.""",
arguments: {'type': _type});
}
@@ -502,7 +503,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithConstructor(String name) {
return new Message(codeConflictsWithConstructor,
- message: """Conflicts with constructor '$name'.""",
+ message: """Conflicts with constructor '${name}'.""",
arguments: {'name': name});
}
@@ -521,7 +522,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithFactory(String name) {
return new Message(codeConflictsWithFactory,
- message: """Conflicts with factory '$name'.""",
+ message: """Conflicts with factory '${name}'.""",
arguments: {'name': name});
}
@@ -540,7 +541,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithMember(String name) {
return new Message(codeConflictsWithMember,
- message: """Conflicts with member '$name'.""", arguments: {'name': name});
+ message: """Conflicts with member '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -559,7 +561,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithMemberWarning(String name) {
return new Message(codeConflictsWithMemberWarning,
- message: """Conflicts with member '$name'.""", arguments: {'name': name});
+ message: """Conflicts with member '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -577,7 +580,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithSetter(String name) {
return new Message(codeConflictsWithSetter,
- message: """Conflicts with setter '$name'.""", arguments: {'name': name});
+ message: """Conflicts with setter '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -596,7 +600,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithSetterWarning(String name) {
return new Message(codeConflictsWithSetterWarning,
- message: """Conflicts with setter '$name'.""", arguments: {'name': name});
+ message: """Conflicts with setter '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -615,7 +620,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConflictsWithTypeVariable(String name) {
return new Message(codeConflictsWithTypeVariable,
- message: """Conflicts with type variable '$name'.""",
+ message: """Conflicts with type variable '${name}'.""",
arguments: {'name': name});
}
@@ -741,7 +746,7 @@
Message _withArgumentsConstEvalDuplicateKey(Constant constant) {
return new Message(codeConstEvalDuplicateKey,
message:
- """The key '$constant' conflicts with another existing key in the map.""",
+ """The key '${constant}' conflicts with another existing key in the map.""",
arguments: {'constant': constant});
}
@@ -772,7 +777,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstEvalFailedAssertionWithMessage(String string) {
return new Message(codeConstEvalFailedAssertionWithMessage,
- message: """This assertion failed with message: $string""",
+ message: """This assertion failed with message: ${string}""",
arguments: {'string': string});
}
@@ -815,7 +820,7 @@
return new Message(codeConstEvalInvalidBinaryOperandType,
message:
- """Binary operator '$string' on '$constant' requires operand of type '$type', but was of type '$type2'.""",
+ """Binary operator '${string}' on '${constant}' requires operand of type '${type}', but was of type '${type2}'.""",
arguments: {
'string': string,
'constant': constant,
@@ -848,7 +853,7 @@
String string, Constant constant) {
return new Message(codeConstEvalInvalidMethodInvocation,
message:
- """The method '$string' can't be invoked on '$constant' within a const context.""",
+ """The method '${string}' can't be invoked on '${constant}' within a const context.""",
arguments: {'string': string, 'constant': constant});
}
@@ -873,7 +878,7 @@
Message _withArgumentsConstEvalInvalidStaticInvocation(String name) {
return new Message(codeConstEvalInvalidStaticInvocation,
message:
- """The invocation of '$name' is not allowed within a const context.""",
+ """The invocation of '${name}' is not allowed within a const context.""",
arguments: {'name': name});
}
@@ -899,7 +904,7 @@
Constant constant) {
return new Message(codeConstEvalInvalidStringInterpolationOperand,
message:
- """The '$constant' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.""",
+ """The '${constant}' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used.""",
arguments: {'constant': constant});
}
@@ -937,7 +942,7 @@
return new Message(codeConstEvalInvalidType,
message:
- """Expected constant '$constant' to be of type '$type', but was of type '$type2'.""",
+ """Expected constant '${constant}' to be of type '${type}', but was of type '${type2}'.""",
arguments: {'constant': constant, 'type': _type, 'type2': _type2});
}
@@ -961,7 +966,7 @@
Message _withArgumentsConstEvalNonConstantLiteral(String string) {
return new Message(codeConstEvalNonConstantLiteral,
message:
- """Can't have a non-constant $string literal within a const context.""",
+ """Can't have a non-constant ${string} literal within a const context.""",
arguments: {'string': string});
}
@@ -997,7 +1002,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstFieldWithoutInitializer(String name) {
return new Message(codeConstFieldWithoutInitializer,
- message: """The const variable '$name' must be initialized.""",
+ message: """The const variable '${name}' must be initialized.""",
tip:
"""Try adding an initializer ('= <expression>') to the declaration.""",
arguments: {'name': name});
@@ -1029,7 +1034,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstructorNotFound(String name) {
return new Message(codeConstructorNotFound,
- message: """Couldn't find constructor '$name'.""",
+ message: """Couldn't find constructor '${name}'.""",
arguments: {'name': name});
}
@@ -1083,7 +1088,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsConstructorWithWrongNameContext(String name) {
return new Message(codeConstructorWithWrongNameContext,
- message: """The name of the enclosing class is '$name'.""",
+ message: """The name of the enclosing class is '${name}'.""",
arguments: {'name': name});
}
@@ -1131,8 +1136,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCouldNotParseUri(String string, String string2) {
return new Message(codeCouldNotParseUri,
- message: """Couldn't parse URI '$string':
- $string2.""", arguments: {'string': string, 'string2': string2});
+ message: """Couldn't parse URI '${string}':
+ ${string2}.""", arguments: {'string': string, 'string2': string2});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1200,7 +1205,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCyclicClassHierarchy(String name, String string) {
return new Message(codeCyclicClassHierarchy,
- message: """'$name' is a supertype of itself via '$string'.""",
+ message: """'${name}' is a supertype of itself via '${string}'.""",
arguments: {'name': name, 'string': string});
}
@@ -1220,7 +1225,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsCyclicTypedef(String name) {
return new Message(codeCyclicTypedef,
- message: """The typedef '$name' has a reference to itself.""",
+ message: """The typedef '${name}' has a reference to itself.""",
arguments: {'name': name});
}
@@ -1278,7 +1283,7 @@
Message _withArgumentsDeferredPrefixDuplicated(String name) {
return new Message(codeDeferredPrefixDuplicated,
message:
- """Can't use the name '$name' for a deferred library, as the name is used elsewhere.""",
+ """Can't use the name '${name}' for a deferred library, as the name is used elsewhere.""",
arguments: {'name': name});
}
@@ -1298,7 +1303,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDeferredPrefixDuplicatedCause(String name) {
return new Message(codeDeferredPrefixDuplicatedCause,
- message: """'$name' is used here.""", arguments: {'name': name});
+ message: """'${name}' is used here.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1332,47 +1337,50 @@
return new Message(codeDeferredTypeAnnotation,
message:
- """The type '$type' is deferred loaded via prefix '$name' and can't be used as a type annotation.""",
- tip: """Try removing 'deferred' from the import of '$name' or use a supertype of '$type' that isn't deferred.""",
+ """The type '${type}' is deferred loaded via prefix '${name}' and can't be used as a type annotation.""",
+ tip: """Try removing 'deferred' from the import of '${name}' or use a supertype of '${type}' that isn't deferred.""",
arguments: {'type': _type, 'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
- Message Function(int count, int count2, String string, String string2,
- String string3)> templateDillOutlineSummary =
- const Template<
- Message Function(int count, int count2, String string,
- String string2, String string3)>(
+ Message Function(
+ int count, int count2, num _num1, num _num2, num _num3)>
+ templateDillOutlineSummary = const Template<
+ Message Function(
+ int count, int count2, num _num1, num _num2, num _num3)>(
messageTemplate:
- r"""Indexed #count libraries (#count2 bytes) in #string, that is,
-#string2 bytes/ms, and
-#string3 ms/libraries.""",
+ r"""Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is,
+#num2%12.3 bytes/ms, and
+#num3%12.3 ms/libraries.""",
withArguments: _withArgumentsDillOutlineSummary);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<
- Message Function(int count, int count2, String string, String string2,
- String string3)> codeDillOutlineSummary = const Code<
- Message Function(
- int count, int count2, String string, String string2, String string3)>(
+ Message Function(int count, int count2, num _num1, num _num2,
+ num _num3)> codeDillOutlineSummary = const Code<
+ Message Function(int count, int count2, num _num1, num _num2, num _num3)>(
"DillOutlineSummary",
templateDillOutlineSummary,
);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDillOutlineSummary(
- int count, int count2, String string, String string2, String string3) {
+ int count, int count2, num _num1, num _num2, num _num3) {
+ String num1 = _num1.toStringAsFixed(3);
+ String num2 = _num2.toStringAsFixed(3).padLeft(12);
+ String num3 = _num3.toStringAsFixed(3).padLeft(12);
return new Message(codeDillOutlineSummary,
- message: """Indexed $count libraries ($count2 bytes) in $string, that is,
-$string2 bytes/ms, and
-$string3 ms/libraries.""",
+ message:
+ """Indexed ${count} libraries (${count2} bytes) in ${num1}ms, that is,
+${num2} bytes/ms, and
+${num3} ms/libraries.""",
arguments: {
'count': count,
'count2': count2,
- 'string': string,
- 'string2': string2,
- 'string3': string3
+ 'num1': _num1,
+ 'num2': _num2,
+ 'num3': _num3
});
}
@@ -1419,7 +1427,7 @@
Message _withArgumentsDuplicateLabelInSwitchStatement(String name) {
return new Message(codeDuplicateLabelInSwitchStatement,
message:
- """The label '$name' was already used in this switch statement.""",
+ """The label '${name}' was already used in this switch statement.""",
tip: """Try choosing a different name for this label.""",
arguments: {'name': name});
}
@@ -1450,7 +1458,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedDefinition(String name) {
return new Message(codeDuplicatedDefinition,
- message: """Duplicated definition of '$name'.""",
+ message: """Duplicated definition of '${name}'.""",
arguments: {'name': name});
}
@@ -1476,7 +1484,7 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeDuplicatedExport,
- message: """'$name' is exported from both '$uri' and '$uri2'.""",
+ message: """'${name}' is exported from both '${uri}' and '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -1500,7 +1508,7 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeDuplicatedExportInType,
- message: """'$name' is exported from both '$uri' and '$uri2'.""",
+ message: """'${name}' is exported from both '${uri}' and '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -1524,7 +1532,7 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeDuplicatedImport,
- message: """'$name' is imported from both '$uri' and '$uri2'.""",
+ message: """'${name}' is imported from both '${uri}' and '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -1548,7 +1556,7 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeDuplicatedImportInType,
- message: """'$name' is imported from both '$uri' and '$uri2'.""",
+ message: """'${name}' is imported from both '${uri}' and '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -1570,7 +1578,7 @@
Message _withArgumentsDuplicatedModifier(Token token) {
String lexeme = token.lexeme;
return new Message(codeDuplicatedModifier,
- message: """The modifier '$lexeme' was already specified.""",
+ message: """The modifier '${lexeme}' was already specified.""",
tip: """Try removing all but one occurance of the modifier.""",
arguments: {'token': token});
}
@@ -1590,7 +1598,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedName(String name) {
return new Message(codeDuplicatedName,
- message: """'$name' is already declared in this scope.""",
+ message: """'${name}' is already declared in this scope.""",
arguments: {'name': name});
}
@@ -1609,7 +1617,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedNameCause(String name) {
return new Message(codeDuplicatedNameCause,
- message: """Previous declaration of '$name'.""",
+ message: """Previous declaration of '${name}'.""",
arguments: {'name': name});
}
@@ -1635,7 +1643,7 @@
Message _withArgumentsDuplicatedNamePreviouslyUsed(String name) {
return new Message(codeDuplicatedNamePreviouslyUsed,
message:
- """Can't declare '$name' because it was already used in this scope.""",
+ """Can't declare '${name}' because it was already used in this scope.""",
arguments: {'name': name});
}
@@ -1657,7 +1665,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedNamePreviouslyUsedCause(String name) {
return new Message(codeDuplicatedNamePreviouslyUsedCause,
- message: """Previous use of '$name'.""", arguments: {'name': name});
+ message: """Previous use of '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1676,7 +1684,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedParameterName(String name) {
return new Message(codeDuplicatedParameterName,
- message: """Duplicated parameter name '$name'.""",
+ message: """Duplicated parameter name '${name}'.""",
arguments: {'name': name});
}
@@ -1696,7 +1704,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsDuplicatedParameterNameCause(String name) {
return new Message(codeDuplicatedParameterNameCause,
- message: """Other parameter named '$name'.""", arguments: {'name': name});
+ message: """Other parameter named '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1750,7 +1759,7 @@
Message _withArgumentsEnumConstantSameNameAsEnclosing(String name) {
return new Message(codeEnumConstantSameNameAsEnclosing,
message:
- """Name of enum constant '$name' can't be the same as the enum's own name.""",
+ """Name of enum constant '${name}' can't be the same as the enum's own name.""",
arguments: {'name': name});
}
@@ -1844,7 +1853,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedButGot(String string) {
return new Message(codeExpectedButGot,
- message: """Expected '$string' before this.""",
+ message: """Expected '${string}' before this.""",
arguments: {'string': string});
}
@@ -1864,7 +1873,7 @@
Message _withArgumentsExpectedClassBody(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedClassBody,
- message: """Expected a class body, but got '$lexeme'.""",
+ message: """Expected a class body, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -1884,7 +1893,7 @@
Message _withArgumentsExpectedClassBodyToSkip(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedClassBodyToSkip,
- message: """Expected a class body, but got '$lexeme'.""",
+ message: """Expected a class body, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -1904,7 +1913,7 @@
Message _withArgumentsExpectedClassMember(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedClassMember,
- message: """Expected a class member, but got '$lexeme'.""",
+ message: """Expected a class member, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -1924,7 +1933,7 @@
Message _withArgumentsExpectedDeclaration(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedDeclaration,
- message: """Expected a declaration, but got '$lexeme'.""",
+ message: """Expected a declaration, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -1947,7 +1956,7 @@
Message _withArgumentsExpectedEnumBody(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedEnumBody,
- message: """Expected a enum body, but got '$lexeme'.""",
+ message: """Expected a enum body, but got '${lexeme}'.""",
tip:
"""An enum definition must have a body with at least one constant name.""",
arguments: {'token': token});
@@ -1969,7 +1978,7 @@
Message _withArgumentsExpectedFunctionBody(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedFunctionBody,
- message: """Expected a function body, but got '$lexeme'.""",
+ message: """Expected a function body, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -2001,7 +2010,7 @@
Message _withArgumentsExpectedIdentifier(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedIdentifier,
- message: """Expected an identifier, but got '$lexeme'.""",
+ message: """Expected an identifier, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -2049,7 +2058,7 @@
Message _withArgumentsExpectedString(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedString,
- message: """Expected a String, but got '$lexeme'.""",
+ message: """Expected a String, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -2068,7 +2077,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExpectedToken(String string) {
return new Message(codeExpectedToken,
- message: """Expected to find '$string'.""",
+ message: """Expected to find '${string}'.""",
arguments: {'string': string});
}
@@ -2090,7 +2099,7 @@
Message _withArgumentsExpectedType(Token token) {
String lexeme = token.lexeme;
return new Message(codeExpectedType,
- message: """Expected a type, but got '$lexeme'.""",
+ message: """Expected a type, but got '${lexeme}'.""",
arguments: {'token': token});
}
@@ -2131,7 +2140,8 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeExportHidesExport,
- message: """Export of '$name' (from '$uri') hides export from '$uri2'.""",
+ message:
+ """Export of '${name}' (from '${uri}') hides export from '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -2161,7 +2171,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsExtendingEnum(String name) {
return new Message(codeExtendingEnum,
- message: """'$name' is an enum and can't be extended or implemented.""",
+ message: """'${name}' is an enum and can't be extended or implemented.""",
arguments: {'name': name});
}
@@ -2182,7 +2192,7 @@
Message _withArgumentsExtendingRestricted(String name) {
return new Message(codeExtendingRestricted,
message:
- """'$name' is restricted and can't be extended or implemented.""",
+ """'${name}' is restricted and can't be extended or implemented.""",
arguments: {'name': name});
}
@@ -2327,8 +2337,8 @@
Message _withArgumentsExtraneousModifier(Token token) {
String lexeme = token.lexeme;
return new Message(codeExtraneousModifier,
- message: """Can't have modifier '$lexeme' here.""",
- tip: """Try removing '$lexeme'.""",
+ message: """Can't have modifier '${lexeme}' here.""",
+ tip: """Try removing '${lexeme}'.""",
arguments: {'token': token});
}
@@ -2368,7 +2378,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsFastaCLIArgumentRequired(String name) {
return new Message(codeFastaCLIArgumentRequired,
- message: """Expected value after '$name'.""", arguments: {'name': name});
+ message: """Expected value after '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2492,7 +2503,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsFinalFieldWithoutInitializer(String name) {
return new Message(codeFinalFieldWithoutInitializer,
- message: """The final variable '$name' must be initialized.""",
+ message: """The final variable '${name}' must be initialized.""",
tip:
"""Try adding an initializer ('= <expression>') to the declaration.""",
arguments: {'name': name});
@@ -2518,7 +2529,7 @@
Message _withArgumentsFinalInstanceVariableAlreadyInitialized(String name) {
return new Message(codeFinalInstanceVariableAlreadyInitialized,
message:
- """'$name' is a final instance variable that has already been initialized.""",
+ """'${name}' is a final instance variable that has already been initialized.""",
arguments: {'name': name});
}
@@ -2542,7 +2553,8 @@
Message _withArgumentsFinalInstanceVariableAlreadyInitializedCause(
String name) {
return new Message(codeFinalInstanceVariableAlreadyInitializedCause,
- message: """'$name' was initialized here.""", arguments: {'name': name});
+ message: """'${name}' was initialized here.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2613,7 +2625,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsGetterNotFound(String name) {
return new Message(codeGetterNotFound,
- message: """Getter not found: '$name'.""", arguments: {'name': name});
+ message: """Getter not found: '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2654,7 +2666,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIllegalMixin(String name) {
return new Message(codeIllegalMixin,
- message: """The type '$name' can't be mixed in.""",
+ message: """The type '${name}' can't be mixed in.""",
arguments: {'name': name});
}
@@ -2676,7 +2688,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIllegalMixinDueToConstructors(String name) {
return new Message(codeIllegalMixinDueToConstructors,
- message: """Can't use '$name' as a mixin because it has constructors.""",
+ message:
+ """Can't use '${name}' as a mixin because it has constructors.""",
arguments: {'name': name});
}
@@ -2699,7 +2712,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsIllegalMixinDueToConstructorsCause(String name) {
return new Message(codeIllegalMixinDueToConstructorsCause,
- message: """This constructor prevents using '$name' as a mixin.""",
+ message: """This constructor prevents using '${name}' as a mixin.""",
arguments: {'name': name});
}
@@ -2751,7 +2764,7 @@
return new Message(codeImplicitCallOfNonMethod,
message:
- """Can't invoke the type '$type' because its declaration of `.call` is not a method.""",
+ """Can't invoke the type '${type}' because its declaration of `.call` is not a method.""",
tip: """Change .call to a method or explicitly invoke .call.""",
arguments: {'type': _type});
}
@@ -2786,7 +2799,8 @@
String uri = relativizeUri(uri_);
String uri2 = relativizeUri(uri2_);
return new Message(codeImportHidesImport,
- message: """Import of '$name' (from '$uri') hides import from '$uri2'.""",
+ message:
+ """Import of '${name}' (from '${uri}') hides import from '${uri2}'.""",
arguments: {'name': name, 'uri': uri_, 'uri2': uri2_});
}
@@ -2870,8 +2884,8 @@
return new Message(codeInitializingFormalTypeMismatch,
message:
- """The type of parameter '$name' ($type) is not a subtype of the corresponding field's type ($type2).""",
- tip: """Try changing the type of parameter '$name' to a subtype of $type2.""",
+ """The type of parameter '${name}' (${type}) is not a subtype of the corresponding field's type (${type2}).""",
+ tip: """Try changing the type of parameter '${name}' to a subtype of ${type2}.""",
arguments: {'name': name, 'type': _type, 'type2': _type2});
}
@@ -2902,7 +2916,7 @@
Message _withArgumentsInputFileNotFound(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeInputFileNotFound,
- message: """Input file not found: $uri.""", arguments: {'uri': uri_});
+ message: """Input file not found: ${uri}.""", arguments: {'uri': uri_});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2928,7 +2942,7 @@
String lexeme = token.lexeme;
return new Message(codeIntegerLiteralIsOutOfRange,
message:
- """The integer literal $lexeme can't be represented in 64 bits.""",
+ """The integer literal ${lexeme} can't be represented in 64 bits.""",
tip:
"""Try using the BigInt class if you need an integer larger than 9,223,372,036,854,775,807 or less than -9,223,372,036,854,775,808.""",
arguments: {'token': token});
@@ -2974,7 +2988,7 @@
String name, Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeInternalProblemConstructorNotFound,
- message: """No constructor named '$name' in '$uri'.""",
+ message: """No constructor named '${name}' in '${uri}'.""",
arguments: {'name': name, 'uri': uri_});
}
@@ -2996,7 +3010,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemContextSeverity(String string) {
return new Message(codeInternalProblemContextSeverity,
- message: """Non-context message has context severity: $string""",
+ message: """Non-context message has context severity: ${string}""",
arguments: {'string': string});
}
@@ -3039,7 +3053,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemMissingSeverity(String string) {
return new Message(codeInternalProblemMissingSeverity,
- message: """Message code missing severity: $string""",
+ message: """Message code missing severity: ${string}""",
arguments: {'string': string});
}
@@ -3058,7 +3072,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemNotFound(String name) {
return new Message(codeInternalProblemNotFound,
- message: """Couldn't find '$name'.""", arguments: {'name': name});
+ message: """Couldn't find '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3078,7 +3092,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemNotFoundIn(String name, String name2) {
return new Message(codeInternalProblemNotFoundIn,
- message: """Couldn't find '$name' in '$name2'.""",
+ message: """Couldn't find '${name}' in '${name2}'.""",
arguments: {'name': name, 'name2': name2});
}
@@ -3110,7 +3124,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemPrivateConstructorAccess(String name) {
return new Message(codeInternalProblemPrivateConstructorAccess,
- message: """Can't access private constructor '$name'.""",
+ message: """Can't access private constructor '${name}'.""",
arguments: {'name': name});
}
@@ -3142,8 +3156,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemStackNotEmpty(String name, String string) {
return new Message(codeInternalProblemStackNotEmpty,
- message: """$name.stack isn't empty:
- $string""", arguments: {'name': name, 'string': string});
+ message: """${name}.stack isn't empty:
+ ${string}""", arguments: {'name': name, 'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3164,7 +3178,8 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemSuperclassNotFound(String name) {
return new Message(codeInternalProblemSuperclassNotFound,
- message: """Superclass not found '$name'.""", arguments: {'name': name});
+ message: """Superclass not found '${name}'.""",
+ arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3184,7 +3199,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemUnexpected(String string, String string2) {
return new Message(codeInternalProblemUnexpected,
- message: """Expected '$string', but got '$string2'.""",
+ message: """Expected '${string}', but got '${string2}'.""",
arguments: {'string': string, 'string2': string2});
}
@@ -3205,7 +3220,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemUnhandled(String string, String string2) {
return new Message(codeInternalProblemUnhandled,
- message: """Unhandled $string in $string2.""",
+ message: """Unhandled ${string} in ${string2}.""",
arguments: {'string': string, 'string2': string2});
}
@@ -3225,7 +3240,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemUnimplemented(String string) {
return new Message(codeInternalProblemUnimplemented,
- message: """Unimplemented $string.""", arguments: {'string': string});
+ message: """Unimplemented ${string}.""", arguments: {'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3244,7 +3259,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsInternalProblemUnsupported(String name) {
return new Message(codeInternalProblemUnsupported,
- message: """Unsupported operation: '$name'.""",
+ message: """Unsupported operation: '${name}'.""",
arguments: {'name': name});
}
@@ -3265,7 +3280,7 @@
Message _withArgumentsInternalProblemUriMissingScheme(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeInternalProblemUriMissingScheme,
- message: """The URI '$uri' has no scheme.""", arguments: {'uri': uri_});
+ message: """The URI '${uri}' has no scheme.""", arguments: {'uri': uri_});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3286,7 +3301,7 @@
Message _withArgumentsInternalVerificationError(String string) {
return new Message(codeInternalVerificationError,
message: """Verification of the generated program failed:
-$string""", arguments: {'string': string});
+${string}""", arguments: {'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3313,7 +3328,7 @@
Message _withArgumentsInternalVisitorUnsupportedDefault(String string) {
return new Message(codeInternalVisitorUnsupportedDefault,
message:
- """Trying to invoke a default visiting method of a visitor on a node $string.""",
+ """Trying to invoke a default visiting method of a visitor on a node ${string}.""",
tip: """Try invoking one of the specialized 'visit' methods instead.""",
arguments: {'string': string});
}
@@ -3361,8 +3376,8 @@
return new Message(codeInvalidAssignment,
message:
- """A value of type '$type' can't be assigned to a variable of type '$type2'.""",
- tip: """Try changing the type of the left hand side, or casting the right hand side to '$type2'.""",
+ """A value of type '${type}' can't be assigned to a variable of type '${type2}'.""",
+ tip: """Try changing the type of the left hand side, or casting the right hand side to '${type2}'.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3410,7 +3425,7 @@
return new Message(codeInvalidCastFunctionExpr,
message:
- """The function expression type '$type' isn't of expected type '$type2'.""",
+ """The function expression type '${type}' isn't of expected type '${type2}'.""",
tip: """Change the type of the function expression or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3448,9 +3463,8 @@
return new Message(codeInvalidCastLiteralList,
message:
- """The list literal type '$type' isn't of expected type '$type2'.""",
- tip:
- """Change the type of the list literal or the context in which it is used.""",
+ """The list literal type '${type}' isn't of expected type '${type2}'.""",
+ tip: """Change the type of the list literal or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3487,9 +3501,8 @@
return new Message(codeInvalidCastLiteralMap,
message:
- """The map literal type '$type' isn't of expected type '$type2'.""",
- tip:
- """Change the type of the map literal or the context in which it is used.""",
+ """The map literal type '${type}' isn't of expected type '${type2}'.""",
+ tip: """Change the type of the map literal or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3527,7 +3540,7 @@
return new Message(codeInvalidCastLocalFunction,
message:
- """The local function has type '$type' that isn't of expected type '$type2'.""",
+ """The local function has type '${type}' that isn't of expected type '${type2}'.""",
tip: """Change the type of the function or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3565,7 +3578,7 @@
return new Message(codeInvalidCastNewExpr,
message:
- """The constructor returns type '$type' that isn't of expected type '$type2'.""",
+ """The constructor returns type '${type}' that isn't of expected type '${type2}'.""",
tip: """Change the type of the object being constructed or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3603,7 +3616,7 @@
return new Message(codeInvalidCastStaticMethod,
message:
- """The static method has type '$type' that isn't of expected type '$type2'.""",
+ """The static method has type '${type}' that isn't of expected type '${type2}'.""",
tip: """Change the type of the method or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3642,7 +3655,7 @@
return new Message(codeInvalidCastTopLevelFunction,
message:
- """The top level function has type '$type' that isn't of expected type '$type2'.""",
+ """The top level function has type '${type}' that isn't of expected type '${type2}'.""",
tip: """Change the type of the function or the context in which it is used.""",
arguments: {'type': _type, 'type2': _type2});
}
@@ -3685,7 +3698,7 @@
Message _withArgumentsInvalidOperator(Token token) {
String lexeme = token.lexeme;
return new Message(codeInvalidOperator,
- message: """The string '$lexeme' isn't a user-definable operator.""",
+ message: """The string '${lexeme}' isn't a user-definable operator.""",
arguments: {'token': token});
}
@@ -3707,8 +3720,8 @@
Message _withArgumentsInvalidPackageUri(Uri uri_, String string) {
String uri = relativizeUri(uri_);
return new Message(codeInvalidPackageUri,
- message: """Invalid package URI '$uri':
- $string.""", arguments: {'uri': uri_, 'string': string});
+ message: """Invalid package URI '${uri}':
+ ${string}.""", arguments: {'uri': uri_, 'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3751,7 +3764,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLabelNotFound(String name) {
return new Message(codeLabelNotFound,
- message: """Can't find label '$name'.""",
+ message: """Can't find label '${name}'.""",
tip:
"""Try defining the label, or correcting the name to match an existing label.""",
arguments: {'name': name});
@@ -3809,7 +3822,7 @@
String uri = relativizeUri(uri_);
return new Message(codeLoadLibraryHidesMember,
message:
- """The library '$uri' defines a top-level member named 'loadLibrary'. This member is hidden by the special member 'loadLibrary' that the language adds to support deferred loading.""",
+ """The library '${uri}' defines a top-level member named 'loadLibrary'. This member is hidden by the special member 'loadLibrary' that the language adds to support deferred loading.""",
tip: """Try to rename or hide the member.""",
arguments: {'uri': uri_});
}
@@ -3843,7 +3856,7 @@
Message _withArgumentsLocalDefinitionHidesExport(String name, Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeLocalDefinitionHidesExport,
- message: """Local definition of '$name' hides export from '$uri'.""",
+ message: """Local definition of '${name}' hides export from '${uri}'.""",
arguments: {'name': name, 'uri': uri_});
}
@@ -3866,7 +3879,7 @@
Message _withArgumentsLocalDefinitionHidesImport(String name, Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeLocalDefinitionHidesImport,
- message: """Local definition of '$name' hides import from '$uri'.""",
+ message: """Local definition of '${name}' hides import from '${uri}'.""",
arguments: {'name': name, 'uri': uri_});
}
@@ -3904,7 +3917,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsMethodNotFound(String name) {
return new Message(codeMethodNotFound,
- message: """Method not found: '$name'.""", arguments: {'name': name});
+ message: """Method not found: '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3998,7 +4011,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsMissingImplementationCause(String name) {
return new Message(codeMissingImplementationCause,
- message: """'$name' is defined here.""", arguments: {'name': name});
+ message: """'${name}' is defined here.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4034,8 +4047,8 @@
String name, String string) {
return new Message(codeMissingImplementationNotAbstract,
message:
- """The non-abstract class '$name' is missing implementations for these members:
- $string.""",
+ """The non-abstract class '${name}' is missing implementations for these members:
+ ${string}.""",
tip: """Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
@@ -4104,7 +4117,7 @@
String uri = relativizeUri(uri_);
return new Message(codeMissingPartOf,
message:
- """Can't use '$uri' as a part, because it has no 'part of' declaration.""",
+ """Can't use '${uri}' as a part, because it has no 'part of' declaration.""",
arguments: {'uri': uri_});
}
@@ -4161,8 +4174,8 @@
return new Message(codeMixinInferenceNoMatchingClass,
message:
- """Type parameters could not be inferred for the mixin '$name' because
-'$name2' does not implement the mixin's supertype constraint '$type'.""",
+ """Type parameters could not be inferred for the mixin '${name}' because
+'${name2}' does not implement the mixin's supertype constraint '${type}'.""",
arguments: {'name': name, 'name2': name2, 'type': _type});
}
@@ -4255,7 +4268,7 @@
return new Message(codeNoFormals,
message: """A function should have formal parameters.""",
tip:
- """Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to declare a getter.""",
+ """Try adding '()' after '${lexeme}', or add 'get' before '${lexeme}' to declare a getter.""",
arguments: {'token': token});
}
@@ -4274,7 +4287,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNoSuchNamedParameter(String name) {
return new Message(codeNoSuchNamedParameter,
- message: """No named parameter with the name '$name'.""",
+ message: """No named parameter with the name '${name}'.""",
arguments: {'name': name});
}
@@ -4313,7 +4326,7 @@
"U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}";
return new Message(codeNonAsciiIdentifier,
message:
- """The non-ASCII character '$character' ($unicode) can't be used in identifiers, only in strings and comments.""",
+ """The non-ASCII character '${character}' (${unicode}) can't be used in identifiers, only in strings and comments.""",
tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).""",
arguments: {'character': character, 'codePoint': codePoint});
}
@@ -4340,7 +4353,7 @@
"U+${codePoint.toRadixString(16).toUpperCase().padLeft(4, '0')}";
return new Message(codeNonAsciiWhitespace,
message:
- """The non-ASCII space character $unicode can only be used in strings and comments.""",
+ """The non-ASCII space character ${unicode} can only be used in strings and comments.""",
arguments: {'codePoint': codePoint});
}
@@ -4390,7 +4403,7 @@
Message _withArgumentsNotAPrefixInTypeAnnotation(String name, String name2) {
return new Message(codeNotAPrefixInTypeAnnotation,
message:
- """'$name.$name2' can't be used as a type because '$name' doesn't refer to an import prefix.""",
+ """'${name}.${name2}' can't be used as a type because '${name}' doesn't refer to an import prefix.""",
arguments: {'name': name, 'name2': name2});
}
@@ -4410,7 +4423,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsNotAType(String name) {
return new Message(codeNotAType,
- message: """'$name' isn't a type.""", arguments: {'name': name});
+ message: """'${name}' isn't a type.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -4452,7 +4465,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorMinusParameterMismatch(String name) {
return new Message(codeOperatorMinusParameterMismatch,
- message: """Operator '$name' should have zero or one parameter.""",
+ message: """Operator '${name}' should have zero or one parameter.""",
tip:
"""With zero parameters, it has the syntactic form '-a', formally known as 'unary-'. With one parameter, it has the syntactic form 'a - b', formally known as '-'.""",
arguments: {'name': name});
@@ -4475,7 +4488,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorParameterMismatch0(String name) {
return new Message(codeOperatorParameterMismatch0,
- message: """Operator '$name' shouldn't have any parameters.""",
+ message: """Operator '${name}' shouldn't have any parameters.""",
arguments: {'name': name});
}
@@ -4497,7 +4510,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorParameterMismatch1(String name) {
return new Message(codeOperatorParameterMismatch1,
- message: """Operator '$name' should have exactly one parameter.""",
+ message: """Operator '${name}' should have exactly one parameter.""",
arguments: {'name': name});
}
@@ -4519,7 +4532,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOperatorParameterMismatch2(String name) {
return new Message(codeOperatorParameterMismatch2,
- message: """Operator '$name' should have exactly two parameters.""",
+ message: """Operator '${name}' should have exactly two parameters.""",
arguments: {'name': name});
}
@@ -4547,7 +4560,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsOverriddenMethodCause(String name) {
return new Message(codeOverriddenMethodCause,
- message: """This is the overriden method ('$name').""",
+ message: """This is the overriden method ('${name}').""",
arguments: {'name': name});
}
@@ -4573,7 +4586,7 @@
Message _withArgumentsOverrideFewerNamedArguments(String name, String name2) {
return new Message(codeOverrideFewerNamedArguments,
message:
- """The method '$name' has fewer named arguments than those of overridden method '$name2'.""",
+ """The method '${name}' has fewer named arguments than those of overridden method '${name2}'.""",
arguments: {'name': name, 'name2': name2});
}
@@ -4601,7 +4614,7 @@
String name, String name2) {
return new Message(codeOverrideFewerPositionalArguments,
message:
- """The method '$name' has fewer positional arguments than those of overridden method '$name2'.""",
+ """The method '${name}' has fewer positional arguments than those of overridden method '${name2}'.""",
arguments: {'name': name, 'name2': name2});
}
@@ -4630,7 +4643,7 @@
String name, String name2, String name3) {
return new Message(codeOverrideMismatchNamedParameter,
message:
- """The method '$name' doesn't have the named parameter '$name2' of overriden method '$name3'.""",
+ """The method '${name}' doesn't have the named parameter '${name2}' of overriden method '${name3}'.""",
arguments: {'name': name, 'name2': name2, 'name3': name3});
}
@@ -4656,7 +4669,7 @@
Message _withArgumentsOverrideMoreRequiredArguments(String name, String name2) {
return new Message(codeOverrideMoreRequiredArguments,
message:
- """The method '$name' has more required arguments than those of overridden method '$name2'.""",
+ """The method '${name}' has more required arguments than those of overridden method '${name2}'.""",
arguments: {'name': name, 'name2': name2});
}
@@ -4700,8 +4713,8 @@
return new Message(codeOverrideTypeMismatchParameter,
message:
- """The parameter '$name' of the method '$name2' has type $type, which does not match the corresponding type in the overridden method ($type2).""",
- tip: """Change to a supertype of $type2 (or, for a covariant parameter, a subtype).""",
+ """The parameter '${name}' of the method '${name2}' has type ${type}, which does not match the corresponding type in the overridden method (${type2}).""",
+ tip: """Change to a supertype of ${type2} (or, for a covariant parameter, a subtype).""",
arguments: {
'name': name,
'name2': name2,
@@ -4746,8 +4759,8 @@
return new Message(codeOverrideTypeMismatchReturnType,
message:
- """The return type of the method '$name' is $type, which does not match the return type of the overridden method ($type2).""",
- tip: """Change to a subtype of $type2.""",
+ """The return type of the method '${name}' is ${type}, which does not match the return type of the overridden method (${type2}).""",
+ tip: """Change to a subtype of ${type2}.""",
arguments: {'name': name, 'type': _type, 'type2': _type2});
}
@@ -4773,7 +4786,7 @@
Message _withArgumentsOverrideTypeVariablesMismatch(String name, String name2) {
return new Message(codeOverrideTypeVariablesMismatch,
message:
- """Declared type variables of '$name' doesn't match those on overridden method '$name2'.""",
+ """Declared type variables of '${name}' doesn't match those on overridden method '${name2}'.""",
arguments: {'name': name, 'name2': name2});
}
@@ -4796,7 +4809,7 @@
Message _withArgumentsPackageNotFound(String name, Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codePackageNotFound,
- message: """Could not resolve the package '$name' in '$uri'.""",
+ message: """Could not resolve the package '${name}' in '${uri}'.""",
arguments: {'name': name, 'uri': uri_});
}
@@ -4825,7 +4838,7 @@
String uri = relativizeUri(uri_);
return new Message(codePartOfLibraryNameMismatch,
message:
- """Using '$uri' as part of '$name' but its 'part of' declaration says '$name2'.""",
+ """Using '${uri}' as part of '${name}' but its 'part of' declaration says '${name2}'.""",
arguments: {'uri': uri_, 'name': name, 'name2': name2});
}
@@ -4872,7 +4885,7 @@
String uri3 = relativizeUri(uri3_);
return new Message(codePartOfUriMismatch,
message:
- """Using '$uri' as part of '$uri2' but its 'part of' declaration says '$uri3'.""",
+ """Using '${uri}' as part of '${uri2}' but its 'part of' declaration says '${uri3}'.""",
arguments: {'uri': uri_, 'uri2': uri2_, 'uri3': uri3_});
}
@@ -4903,7 +4916,7 @@
String uri2 = relativizeUri(uri2_);
return new Message(codePartOfUseUri,
message:
- """Using '$uri' as part of '$uri2' but its 'part of' declaration says '$name'.""",
+ """Using '${uri}' as part of '${uri2}' but its 'part of' declaration says '${name}'.""",
tip: """Try changing the 'part of' declaration to use a relative file name.""",
arguments: {'uri': uri_, 'uri2': uri2_, 'name': name});
}
@@ -4925,7 +4938,7 @@
Message _withArgumentsPartTwice(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codePartTwice,
- message: """Can't use '$uri' as a part more than once.""",
+ message: """Can't use '${uri}' as a part more than once.""",
arguments: {'uri': uri_});
}
@@ -4984,7 +4997,7 @@
Message _withArgumentsPatchInjectionFailed(String name, Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codePatchInjectionFailed,
- message: """Can't inject '$name' into '$uri'.""",
+ message: """Can't inject '${name}' into '${uri}'.""",
tip: """Try adding '@patch'.""",
arguments: {'name': name, 'uri': uri_});
}
@@ -5097,7 +5110,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsRedirectionTargetNotFound(String name) {
return new Message(codeRedirectionTargetNotFound,
- message: """Redirection constructor target not found: '$name'""",
+ message: """Redirection constructor target not found: '${name}'""",
arguments: {'name': name});
}
@@ -5142,7 +5155,7 @@
Message _withArgumentsSdkRootNotFound(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeSdkRootNotFound,
- message: """SDK root directory not found: $uri.""",
+ message: """SDK root directory not found: ${uri}.""",
arguments: {'uri': uri_});
}
@@ -5168,7 +5181,7 @@
Message _withArgumentsSdkSpecificationNotFound(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeSdkSpecificationNotFound,
- message: """SDK libraries specification not found: $uri.""",
+ message: """SDK libraries specification not found: ${uri}.""",
tip:
"""Normally, the specification is a file named 'libraries.json' in the Dart SDK install location.""",
arguments: {'uri': uri_});
@@ -5191,7 +5204,7 @@
Message _withArgumentsSdkSummaryNotFound(Uri uri_) {
String uri = relativizeUri(uri_);
return new Message(codeSdkSummaryNotFound,
- message: """SDK summary not found: $uri.""", arguments: {'uri': uri_});
+ message: """SDK summary not found: ${uri}.""", arguments: {'uri': uri_});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5209,7 +5222,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSetterNotFound(String name) {
return new Message(codeSetterNotFound,
- message: """Setter not found: '$name'.""", arguments: {'name': name});
+ message: """Setter not found: '${name}'.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5237,42 +5250,44 @@
Message Function(
int count,
int count2,
- String string,
- String string2,
- String
- string3)> templateSourceBodySummary = const Template<
- Message Function(int count, int count2, String string, String string2,
- String string3)>(
+ num _num1,
+ num _num2,
+ num
+ _num3)> templateSourceBodySummary = const Template<
+ Message Function(
+ int count, int count2, num _num1, num _num2, num _num3)>(
messageTemplate:
- r"""Built bodies for #count compilation units (#count2 bytes) in #string, that is,
-#string2 bytes/ms, and
-#string3 ms/compilation unit.""",
+ r"""Built bodies for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
+#num2%12.3 bytes/ms, and
+#num3%12.3 ms/compilation unit.""",
withArguments: _withArgumentsSourceBodySummary);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<
- Message Function(int count, int count2, String string, String string2,
- String string3)> codeSourceBodySummary = const Code<
- Message Function(
- int count, int count2, String string, String string2, String string3)>(
+ Message Function(int count, int count2, num _num1, num _num2,
+ num _num3)> codeSourceBodySummary = const Code<
+ Message Function(int count, int count2, num _num1, num _num2, num _num3)>(
"SourceBodySummary",
templateSourceBodySummary,
);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSourceBodySummary(
- int count, int count2, String string, String string2, String string3) {
+ int count, int count2, num _num1, num _num2, num _num3) {
+ String num1 = _num1.toStringAsFixed(3);
+ String num2 = _num2.toStringAsFixed(3).padLeft(12);
+ String num3 = _num3.toStringAsFixed(3).padLeft(12);
return new Message(codeSourceBodySummary,
message:
- """Built bodies for $count compilation units ($count2 bytes) in $string, that is,
-$string2 bytes/ms, and
-$string3 ms/compilation unit.""",
+ """Built bodies for ${count} compilation units (${count2} bytes) in ${num1}ms, that is,
+${num2} bytes/ms, and
+${num3} ms/compilation unit.""",
arguments: {
'count': count,
'count2': count2,
- 'string': string,
- 'string2': string2,
- 'string3': string3
+ 'num1': _num1,
+ 'num2': _num2,
+ 'num3': _num3
});
}
@@ -5281,42 +5296,44 @@
Message Function(
int count,
int count2,
- String string,
- String string2,
- String
- string3)> templateSourceOutlineSummary = const Template<
- Message Function(int count, int count2, String string, String string2,
- String string3)>(
+ num _num1,
+ num _num2,
+ num
+ _num3)> templateSourceOutlineSummary = const Template<
+ Message Function(
+ int count, int count2, num _num1, num _num2, num _num3)>(
messageTemplate:
- r"""Built outlines for #count compilation units (#count2 bytes) in #string, that is,
-#string2 bytes/ms, and
-#string3 ms/compilation unit.""",
+ r"""Built outlines for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
+#num2%12.3 bytes/ms, and
+#num3%12.3 ms/compilation unit.""",
withArguments: _withArgumentsSourceOutlineSummary);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<
- Message Function(int count, int count2, String string, String string2,
- String string3)> codeSourceOutlineSummary = const Code<
- Message Function(
- int count, int count2, String string, String string2, String string3)>(
+ Message Function(int count, int count2, num _num1, num _num2,
+ num _num3)> codeSourceOutlineSummary = const Code<
+ Message Function(int count, int count2, num _num1, num _num2, num _num3)>(
"SourceOutlineSummary",
templateSourceOutlineSummary,
);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSourceOutlineSummary(
- int count, int count2, String string, String string2, String string3) {
+ int count, int count2, num _num1, num _num2, num _num3) {
+ String num1 = _num1.toStringAsFixed(3);
+ String num2 = _num2.toStringAsFixed(3).padLeft(12);
+ String num3 = _num3.toStringAsFixed(3).padLeft(12);
return new Message(codeSourceOutlineSummary,
message:
- """Built outlines for $count compilation units ($count2 bytes) in $string, that is,
-$string2 bytes/ms, and
-$string3 ms/compilation unit.""",
+ """Built outlines for ${count} compilation units (${count2} bytes) in ${num1}ms, that is,
+${num2} bytes/ms, and
+${num3} ms/compilation unit.""",
arguments: {
'count': count,
'count2': count2,
- 'string': string,
- 'string2': string2,
- 'string3': string3
+ 'num1': _num1,
+ 'num2': _num2,
+ 'num3': _num3
});
}
@@ -5435,7 +5452,7 @@
Message _withArgumentsSuperclassHasNoDefaultConstructor(String name) {
return new Message(codeSuperclassHasNoDefaultConstructor,
message:
- """The superclass, '$name', has no unnamed constructor that takes no arguments.""",
+ """The superclass, '${name}', has no unnamed constructor that takes no arguments.""",
arguments: {'name': name});
}
@@ -5454,7 +5471,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSuperclassHasNoGetter(String name) {
return new Message(codeSuperclassHasNoGetter,
- message: """Superclass has no getter named '$name'.""",
+ message: """Superclass has no getter named '${name}'.""",
arguments: {'name': name});
}
@@ -5475,7 +5492,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSuperclassHasNoMethod(String name) {
return new Message(codeSuperclassHasNoMethod,
- message: """Superclass has no method named '$name'.""",
+ message: """Superclass has no method named '${name}'.""",
arguments: {'name': name});
}
@@ -5494,7 +5511,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSuperclassHasNoSetter(String name) {
return new Message(codeSuperclassHasNoSetter,
- message: """Superclass has no setter named '$name'.""",
+ message: """Superclass has no setter named '${name}'.""",
arguments: {'name': name});
}
@@ -5519,7 +5536,7 @@
Message _withArgumentsSuperclassMethodArgumentMismatch(String name) {
return new Message(codeSuperclassMethodArgumentMismatch,
message:
- """Superclass doesn't have a method named '$name' with matching arguments.""",
+ """Superclass doesn't have a method named '${name}' with matching arguments.""",
arguments: {'name': name});
}
@@ -5547,7 +5564,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSupertypeIsIllegal(String name) {
return new Message(codeSupertypeIsIllegal,
- message: """The type '$name' can't be used as supertype.""",
+ message: """The type '${name}' can't be used as supertype.""",
arguments: {'name': name});
}
@@ -5568,7 +5585,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsSupertypeIsTypeVariable(String name) {
return new Message(codeSupertypeIsTypeVariable,
- message: """The type variable '$name' can't be used as supertype.""",
+ message: """The type variable '${name}' can't be used as supertype.""",
arguments: {'name': name});
}
@@ -5625,7 +5642,7 @@
Message _withArgumentsThisAccessInFieldInitializer(String name) {
return new Message(codeThisAccessInFieldInitializer,
message:
- """Can't access 'this' in a field initializer to read '$name'.""",
+ """Can't access 'this' in a field initializer to read '${name}'.""",
arguments: {'name': name});
}
@@ -5658,7 +5675,7 @@
Message _withArgumentsTooFewArguments(int count, int count2) {
return new Message(codeTooFewArguments,
message:
- """Too few positional arguments: $count required, $count2 given.""",
+ """Too few positional arguments: ${count} required, ${count2} given.""",
arguments: {'count': count, 'count2': count2});
}
@@ -5683,7 +5700,7 @@
Message _withArgumentsTooManyArguments(int count, int count2) {
return new Message(codeTooManyArguments,
message:
- """Too many positional arguments: $count allowed, $count2 given.""",
+ """Too many positional arguments: ${count} allowed, ${count2} given.""",
arguments: {'count': count, 'count2': count2});
}
@@ -5710,24 +5727,23 @@
tip: r"""Try removing 'var.'""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String name, String string)>
+const Template<Message Function(String name, int count)>
templateTypeArgumentMismatch =
- const Template<Message Function(String name, String string)>(
- messageTemplate: r"""'#name' expects #string type arguments.""",
+ const Template<Message Function(String name, int count)>(
+ messageTemplate: r"""'#name' expects #count type arguments.""",
withArguments: _withArgumentsTypeArgumentMismatch);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, String string)>
- codeTypeArgumentMismatch =
- const Code<Message Function(String name, String string)>(
+const Code<Message Function(String name, int count)> codeTypeArgumentMismatch =
+ const Code<Message Function(String name, int count)>(
"TypeArgumentMismatch", templateTypeArgumentMismatch,
severity: Severity.errorLegacyWarning);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsTypeArgumentMismatch(String name, String string) {
+Message _withArgumentsTypeArgumentMismatch(String name, int count) {
return new Message(codeTypeArgumentMismatch,
- message: """'$name' expects $string type arguments.""",
- arguments: {'name': name, 'string': string});
+ message: """'${name}' expects ${count} type arguments.""",
+ arguments: {'name': name, 'count': count});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5750,7 +5766,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsTypeArgumentsOnTypeVariable(String name) {
return new Message(codeTypeArgumentsOnTypeVariable,
- message: """Can't use type arguments with type variable '$name'.""",
+ message: """Can't use type arguments with type variable '${name}'.""",
tip: """Try removing the type arguments.""",
arguments: {'name': name});
}
@@ -5770,7 +5786,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsTypeNotFound(String name) {
return new Message(codeTypeNotFound,
- message: """Type '$name' not found.""", arguments: {'name': name});
+ message: """Type '${name}' not found.""", arguments: {'name': name});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5798,7 +5814,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsTypeVariableDuplicatedNameCause(String name) {
return new Message(codeTypeVariableDuplicatedNameCause,
- message: """The other type variable named '$name'.""",
+ message: """The other type variable named '${name}'.""",
arguments: {'name': name});
}
@@ -5869,9 +5885,10 @@
String type = '$buffer';
return new Message(codeUndefinedGetter,
- message: """The getter '$name' isn't defined for the class '$type'.""",
+ message:
+ """The getter '${name}' isn't defined for the class '${type}'.""",
tip:
- """Try correcting the name to the name of an existing getter, or defining a getter or field named '$name'.""",
+ """Try correcting the name to the name of an existing getter, or defining a getter or field named '${name}'.""",
arguments: {'name': name, 'type': _type});
}
@@ -5902,9 +5919,10 @@
String type = '$buffer';
return new Message(codeUndefinedMethod,
- message: """The method '$name' isn't defined for the class '$type'.""",
+ message:
+ """The method '${name}' isn't defined for the class '${type}'.""",
tip:
- """Try correcting the name to the name of an existing method, or defining a method named '$name'.""",
+ """Try correcting the name to the name of an existing method, or defining a method named '${name}'.""",
arguments: {'name': name, 'type': _type});
}
@@ -5935,9 +5953,10 @@
String type = '$buffer';
return new Message(codeUndefinedSetter,
- message: """The setter '$name' isn't defined for the class '$type'.""",
+ message:
+ """The setter '${name}' isn't defined for the class '${type}'.""",
tip:
- """Try correcting the name to the name of an existing setter, or defining a setter or field named '$name'.""",
+ """Try correcting the name to the name of an existing setter, or defining a setter or field named '${name}'.""",
arguments: {'name': name, 'type': _type});
}
@@ -5968,7 +5987,8 @@
Message _withArgumentsUnexpectedToken(Token token) {
String lexeme = token.lexeme;
return new Message(codeUnexpectedToken,
- message: """Unexpected token '$lexeme'.""", arguments: {'token': token});
+ message: """Unexpected token '${lexeme}'.""",
+ arguments: {'token': token});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -5988,7 +6008,7 @@
Message _withArgumentsUnmatchedToken(String string, Token token) {
String lexeme = token.lexeme;
return new Message(codeUnmatchedToken,
- message: """Can't find '$string' to match '$lexeme'.""",
+ message: """Can't find '${string}' to match '${lexeme}'.""",
arguments: {'string': string, 'token': token});
}
@@ -6018,7 +6038,7 @@
String name, String name2) {
return new Message(codeUnresolvedPrefixInTypeAnnotation,
message:
- """'$name.$name2' can't be used as a type because '$name' isn't defined.""",
+ """'${name}.${name2}' can't be used as a type because '${name}' isn't defined.""",
arguments: {'name': name, 'name2': name2});
}
@@ -6037,7 +6057,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnspecified(String string) {
return new Message(codeUnspecified,
- message: """$string""", arguments: {'string': string});
+ message: """${string}""", arguments: {'string': string});
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6080,7 +6100,7 @@
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsUnterminatedString(String string, String string2) {
return new Message(codeUnterminatedString,
- message: """String starting with $string must end with $string2.""",
+ message: """String starting with ${string} must end with ${string2}.""",
arguments: {'string': string, 'string2': string2});
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index c5612e8..27553c3 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -1265,7 +1265,7 @@
@override
void warnTypeArgumentsMismatch(String name, int expected, int charOffset) {
addProblemErrorIfConst(
- fasta.templateTypeArgumentMismatch.withArguments(name, '${expected}'),
+ fasta.templateTypeArgumentMismatch.withArguments(name, expected),
charOffset,
name.length);
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index efd77e8..1cb2acc 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -148,7 +148,7 @@
// That should be caught and reported as a compile-time error earlier.
return unhandled(
templateTypeArgumentMismatch
- .withArguments(name, typeVariables.length.toString())
+ .withArguments(name, typeVariables.length)
.message,
"buildTypeArguments",
-1,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
index b83c6d6..0210fc4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart
@@ -112,7 +112,7 @@
// That should be caught and reported as a compile-time error earlier.
return unhandled(
templateTypeArgumentMismatch
- .withArguments(name, typeVariables.length.toString())
+ .withArguments(name, typeVariables.length)
.message,
"buildTypeArguments",
-1,
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index d2e21c5..1a1ab4d 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -185,11 +185,7 @@
});
double ms = elapsed.inMicroseconds / Duration.microsecondsPerMillisecond;
Message message = template.withArguments(
- libraryCount,
- byteCount,
- "${format(ms, 3, 0)}ms",
- format(byteCount / ms, 3, 12),
- format(ms / libraryCount, 3, 12));
+ libraryCount, byteCount, ms, byteCount / ms, ms / libraryCount);
print("$sinceStart: ${message.message}");
});
}
@@ -283,7 +279,3 @@
int length, Uri fileUri,
{List<LocatedMessage> context}) {}
}
-
-String format(double d, int fractionDigits, int width) {
- return d.toStringAsFixed(fractionDigits).padLeft(width);
-}
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 5388a9b..f36d34b 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -59,17 +59,22 @@
# `#unicode` a Unicode short identifier (U+xxxx). We use this to represent code
# units or code points.
#
-# `#name` a name (a string).
-#
-# `#name2` another name (a string).
+# `#name`, `#name2`, `#name3`: names (as strings).
#
# `#lexeme` a token. The token's `lexeme` property is used.
#
-# `#string` a string.
+# `#string`, `#string2`, `#string3`: strings (that aren't names).
#
-# `#string2` another string.
+# `#type`, #type2`: Kernel types.
#
-# `#uri` a Uri.
+# `#uri`, `#uri2`, `#uri3`: URIs.
+#
+# `#count`, `#count2`: counts (as integers)
+#
+# `#constant` a Kernel constant.
+#
+# `#num1%N.M`, `#num2%N.M`, `#num3%N.M`: numbers (doubles) formatted to minimum
+# width N and with M fraction digits.
AsciiControlCharacter:
template: "The control character #unicode can only be used in strings and comments."
@@ -1147,8 +1152,7 @@
severity: NIT
TypeArgumentMismatch:
- # TODO(sigmund): #string should be a number instead.
- template: "'#name' expects #string type arguments."
+ template: "'#name' expects #count type arguments."
severity: ERROR_LEGACY_WARNING
NotAType:
@@ -2163,21 +2167,21 @@
SourceOutlineSummary:
template: |
- Built outlines for #count compilation units (#count2 bytes) in #string, that is,
- #string2 bytes/ms, and
- #string3 ms/compilation unit.
+ Built outlines for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
+ #num2%12.3 bytes/ms, and
+ #num3%12.3 ms/compilation unit.
SourceBodySummary:
template: |
- Built bodies for #count compilation units (#count2 bytes) in #string, that is,
- #string2 bytes/ms, and
- #string3 ms/compilation unit.
+ Built bodies for #count compilation units (#count2 bytes) in #num1%.3ms, that is,
+ #num2%12.3 bytes/ms, and
+ #num3%12.3 ms/compilation unit.
DillOutlineSummary:
template: |
- Indexed #count libraries (#count2 bytes) in #string, that is,
- #string2 bytes/ms, and
- #string3 ms/libraries.
+ Indexed #count libraries (#count2 bytes) in #num1%.3ms, that is,
+ #num2%12.3 bytes/ms, and
+ #num3%12.3 ms/libraries.
CantInferTypeDueToInconsistentOverrides:
template: "Can't infer the type of '#string': overridden members must all have the same type."
diff --git a/pkg/front_end/tool/_fasta/generate_messages.dart b/pkg/front_end/tool/_fasta/generate_messages.dart
index 397bded..5b2e15c 100644
--- a/pkg/front_end/tool/_fasta/generate_messages.dart
+++ b/pkg/front_end/tool/_fasta/generate_messages.dart
@@ -61,7 +61,8 @@
return new DartFormatter().format("$sb");
}
-final RegExp placeholderPattern = new RegExp("#[a-zA-Z0-9_]+");
+final RegExp placeholderPattern =
+ new RegExp("#\([-a-zA-Z0-9_]+\)(?:%\([0-9]*\)\.\([0-9]+\))?");
String compileTemplate(String name, String template, String tip,
String analyzerCode, String dart2jsCode, String severity) {
@@ -78,13 +79,34 @@
var conversions = new Set<String>();
var arguments = new Set<String>();
for (Match match in placeholderPattern.allMatches("$template${tip ?? ''}")) {
- switch (match[0]) {
- case "#character":
+ String name = match[1];
+ String padding = match[2];
+ String fractionDigits = match[3];
+
+ String format(String name) {
+ String conversion;
+ if (fractionDigits == null) {
+ conversion = "'\$$name'";
+ } else {
+ conversion = "$name.toStringAsFixed($fractionDigits)";
+ }
+ if (padding.isNotEmpty) {
+ if (padding.startsWith("0")) {
+ conversion += ".padLeft(${int.parse(padding)}, '0')";
+ } else {
+ conversion += ".padLeft(${int.parse(padding)})";
+ }
+ }
+ return conversion;
+ }
+
+ switch (name) {
+ case "character":
parameters.add("String character");
arguments.add("'character': character");
break;
- case "#unicode":
+ case "unicode":
// Write unicode value using at least four (but otherwise no more than
// necessary) hex digits, using uppercase letters.
// http://www.unicode.org/versions/Unicode10.0.0/appA.pdf
@@ -94,43 +116,43 @@
arguments.add("'codePoint': codePoint");
break;
- case "#name":
+ case "name":
parameters.add("String name");
arguments.add("'name': name");
break;
- case "#name2":
+ case "name2":
parameters.add("String name2");
arguments.add("'name2': name2");
break;
- case "#name3":
+ case "name3":
parameters.add("String name3");
arguments.add("'name3': name3");
break;
- case "#lexeme":
+ case "lexeme":
parameters.add("Token token");
conversions.add("String lexeme = token.lexeme;");
arguments.add("'token': token");
break;
- case "#string":
+ case "string":
parameters.add("String string");
arguments.add("'string': string");
break;
- case "#string2":
+ case "string2":
parameters.add("String string2");
arguments.add("'string2': string2");
break;
- case "#string3":
+ case "string3":
parameters.add("String string3");
arguments.add("'string3': string3");
break;
- case "#type":
+ case "type":
parameters.add("DartType _type");
conversions.add(r"""
NameSystem nameSystem = new NameSystem();
@@ -141,7 +163,7 @@
arguments.add("'type': _type");
break;
- case "#type2":
+ case "type2":
parameters.add("DartType _type2");
conversions.add(r"""
buffer = new StringBuffer();
@@ -151,47 +173,67 @@
arguments.add("'type2': _type2");
break;
- case "#uri":
+ case "uri":
parameters.add("Uri uri_");
conversions.add("String uri = relativizeUri(uri_);");
arguments.add("'uri': uri_");
break;
- case "#uri2":
+ case "uri2":
parameters.add("Uri uri2_");
conversions.add("String uri2 = relativizeUri(uri2_);");
arguments.add("'uri2': uri2_");
break;
- case "#uri3":
+ case "uri3":
parameters.add("Uri uri3_");
conversions.add("String uri3 = relativizeUri(uri3_);");
arguments.add("'uri3': uri3_");
break;
- case "#count":
+ case "count":
parameters.add("int count");
arguments.add("'count': count");
break;
- case "#count2":
+ case "count2":
parameters.add("int count2");
arguments.add("'count2': count2");
break;
- case "#constant":
+ case "constant":
parameters.add("Constant constant");
arguments.add("'constant': constant");
break;
+ case "num1":
+ parameters.add("num _num1");
+ conversions.add("String num1 = ${format('_num1')};");
+ arguments.add("'num1': _num1");
+ break;
+
+ case "num2":
+ parameters.add("num _num2");
+ conversions.add("String num2 = ${format('_num2')};");
+ arguments.add("'num2': _num2");
+ break;
+
+ case "num3":
+ parameters.add("num _num3");
+ conversions.add("String num3 = ${format('_num3')};");
+ arguments.add("'num3': _num3");
+ break;
+
default:
- throw "Unhandled placeholder in template: ${match[0]}";
+ throw "Unhandled placeholder in template: '$name'";
}
}
String interpolate(String name, String text) {
- return "$name: "
- "\"\"\"${text.replaceAll(r'$', r'\$').replaceAll('#', '\$')}\"\"\"";
+ text = text
+ .replaceAll(r"$", r"\$")
+ .replaceAllMapped(placeholderPattern, (Match m) => "\${${m[1]}}");
+ return "$name: \"\"\"$text\"\"\"";
}
List<String> codeArguments = <String>[];