| Index: pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
|
| 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 853a54056e199fdd1070a6745bba31909944037f..1d45a640c60055807af81739da4fac04072d85b5 100644
|
| --- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
|
| +++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
|
| @@ -10,1121 +10,1033 @@
|
| part of fasta.codes;
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedClassBodyToSkip> codeExpectedClassBodyToSkip =
|
| - const FastaCode<_ExpectedClassBodyToSkip>("ExpectedClassBodyToSkip",
|
| - template: r"Expected a class body, but got '#lexeme'.",
|
| +const UnboundFastaCode<_ExpectedClassBodyToSkip> codeExpectedClassBodyToSkip =
|
| + const UnboundFastaCode<_ExpectedClassBodyToSkip>("ExpectedClassBodyToSkip",
|
| + template: r"""Expected a class body, but got '#lexeme'.""",
|
| dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedClassBodyToSkip);
|
| -
|
| -typedef FastaMessage _ExpectedClassBodyToSkip(
|
| - Uri uri, int charOffset, Token token);
|
| + bind: _bindExpectedClassBodyToSkip);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedClassBodyToSkip(
|
| - Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip,
|
| - message: "Expected a class body, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| -}
|
| +typedef _ExpectedClassBodyToSkip = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_FunctionTypeDefaultValue> codeFunctionTypeDefaultValue =
|
| - const FastaCode<_FunctionTypeDefaultValue>("FunctionTypeDefaultValue",
|
| - template: r"Can't have a default value in a function type.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatFunctionTypeDefaultValue);
|
| -
|
| -typedef FastaMessage _FunctionTypeDefaultValue(Uri uri, int charOffset);
|
| +FastaMessage Function(Uri, int) _bindExpectedClassBodyToSkip(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip,
|
| + message: """Expected a class body, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatFunctionTypeDefaultValue(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeFunctionTypeDefaultValue,
|
| - message: "Can't have a default value in a function type.", arguments: {});
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_StackOverflow> codeStackOverflow =
|
| - const FastaCode<_StackOverflow>("StackOverflow",
|
| - template: r"Stack overflow.",
|
| - dart2jsCode: "GENERIC",
|
| - format: _formatStackOverflow);
|
| -
|
| -typedef FastaMessage _StackOverflow(Uri uri, int charOffset);
|
| -
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatStackOverflow(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeStackOverflow,
|
| - message: "Stack overflow.", arguments: {});
|
| -}
|
| +const BoundFastaCode codeFunctionTypeDefaultValue = const BoundFastaCode(
|
| + "FunctionTypeDefaultValue",
|
| + template: r"""Can't have a default value in a function type.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AssertExtraneousArgument> codeAssertExtraneousArgument =
|
| - const FastaCode<_AssertExtraneousArgument>("AssertExtraneousArgument",
|
| - template: r"`assert` can't have more than two arguments.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatAssertExtraneousArgument);
|
| -
|
| -typedef FastaMessage _AssertExtraneousArgument(Uri uri, int charOffset);
|
| +const BoundFastaCode codeNonInstanceTypeVariableUse = const BoundFastaCode(
|
| + "NonInstanceTypeVariableUse",
|
| + template: r"""Can only use type variables in instance methods.""");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAssertExtraneousArgument(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAssertExtraneousArgument,
|
| - message: "`assert` can't have more than two arguments.", arguments: {});
|
| -}
|
| +const BoundFastaCode codeStackOverflow = const BoundFastaCode("StackOverflow",
|
| + template: r"""Stack overflow.""", dart2jsCode: "GENERIC");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnexpectedToken> codeUnexpectedToken =
|
| - const FastaCode<_UnexpectedToken>("UnexpectedToken",
|
| - template: r"Unexpected token '#lexeme'.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatUnexpectedToken);
|
| -
|
| -typedef FastaMessage _UnexpectedToken(Uri uri, int charOffset, Token token);
|
| +const UnboundFastaCode<_CyclicTypedef> codeCyclicTypedef =
|
| + const UnboundFastaCode<_CyclicTypedef>("CyclicTypedef",
|
| + template: r"""The typedef '#name' has a reference to itself.""",
|
| + bind: _bindCyclicTypedef);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnexpectedToken(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeUnexpectedToken,
|
| - message: "Unexpected token '$lexeme'.", arguments: {'token': token});
|
| -}
|
| +typedef _CyclicTypedef = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AwaitAsIdentifier> codeAwaitAsIdentifier = const FastaCode<
|
| - _AwaitAsIdentifier>("AwaitAsIdentifier",
|
| - template:
|
| - r"'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatAwaitAsIdentifier);
|
| -
|
| -typedef FastaMessage _AwaitAsIdentifier(Uri uri, int charOffset);
|
| +FastaMessage Function(Uri, int) _bindCyclicTypedef(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeCyclicTypedef,
|
| + message: """The typedef '$name' has a reference to itself.""",
|
| + arguments: {'name': name});
|
| + }
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAwaitAsIdentifier(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAwaitAsIdentifier,
|
| - message:
|
| - "'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - arguments: {});
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_FactoryNotSync> codeFactoryNotSync =
|
| - const FastaCode<_FactoryNotSync>("FactoryNotSync",
|
| - template: r"Factories can't use 'async', 'async*', or 'sync*'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatFactoryNotSync);
|
| -
|
| -typedef FastaMessage _FactoryNotSync(Uri uri, int charOffset);
|
| +const BoundFastaCode codeAssertExtraneousArgument = const BoundFastaCode(
|
| + "AssertExtraneousArgument",
|
| + template: r"""`assert` can't have more than two arguments.""",
|
| + dart2jsCode: "FASTA_FATAL");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatFactoryNotSync(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeFactoryNotSync,
|
| - message: "Factories can't use 'async', 'async*', or 'sync*'.",
|
| - arguments: {});
|
| -}
|
| +const UnboundFastaCode<_UnexpectedToken> codeUnexpectedToken =
|
| + const UnboundFastaCode<_UnexpectedToken>("UnexpectedToken",
|
| + template: r"""Unexpected token '#lexeme'.""",
|
| + dart2jsCode: "FASTA_FATAL",
|
| + bind: _bindUnexpectedToken);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_SuperNullAware> codeSuperNullAware =
|
| - const FastaCode<_SuperNullAware>("SuperNullAware",
|
| - template: r"'super' can't be null.",
|
| - tip: r"Try replacing '?.' with '.'",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatSuperNullAware);
|
| -
|
| -typedef FastaMessage _SuperNullAware(Uri uri, int charOffset);
|
| +typedef _UnexpectedToken = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatSuperNullAware(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeSuperNullAware,
|
| - message: "'super' can't be null.",
|
| - tip: "Try replacing '?.' with '.'",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindUnexpectedToken(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeUnexpectedToken,
|
| + message: """Unexpected token '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_PrivateNamedParameter> codePrivateNamedParameter =
|
| - const FastaCode<_PrivateNamedParameter>("PrivateNamedParameter",
|
| - template: r"An optional named parameter can't start with '_'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatPrivateNamedParameter);
|
| -
|
| -typedef FastaMessage _PrivateNamedParameter(Uri uri, int charOffset);
|
| +const BoundFastaCode codeAwaitAsIdentifier = const BoundFastaCode(
|
| + "AwaitAsIdentifier",
|
| + template:
|
| + r"""'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatPrivateNamedParameter(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codePrivateNamedParameter,
|
| - message: "An optional named parameter can't start with '_'.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeFactoryNotSync = const BoundFastaCode("FactoryNotSync",
|
| + template: r"""Factories can't use 'async', 'async*', or 'sync*'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_YieldNotGenerator> codeYieldNotGenerator =
|
| - const FastaCode<_YieldNotGenerator>("YieldNotGenerator",
|
| - template: r"'yield' can only be used in 'sync*' or 'async*' methods.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatYieldNotGenerator);
|
| -
|
| -typedef FastaMessage _YieldNotGenerator(Uri uri, int charOffset);
|
| +const BoundFastaCode codeSuperNullAware = const BoundFastaCode("SuperNullAware",
|
| + template: r"""'super' can't be null.""",
|
| + tip: r"""Try replacing '?.' with '.'""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatYieldNotGenerator(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeYieldNotGenerator,
|
| - message: "'yield' can only be used in 'sync*' or 'async*' methods.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codePrivateNamedParameter = const BoundFastaCode(
|
| + "PrivateNamedParameter",
|
| + template: r"""An optional named parameter can't start with '_'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_SetterNotSync> codeSetterNotSync =
|
| - const FastaCode<_SetterNotSync>("SetterNotSync",
|
| - template: r"Setters can't use 'async', 'async*', or 'sync*'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatSetterNotSync);
|
| -
|
| -typedef FastaMessage _SetterNotSync(Uri uri, int charOffset);
|
| +const BoundFastaCode codeYieldNotGenerator = const BoundFastaCode(
|
| + "YieldNotGenerator",
|
| + template: r"""'yield' can only be used in 'sync*' or 'async*' methods.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatSetterNotSync(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeSetterNotSync,
|
| - message: "Setters can't use 'async', 'async*', or 'sync*'.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeSetterNotSync = const BoundFastaCode("SetterNotSync",
|
| + template: r"""Setters can't use 'async', 'async*', or 'sync*'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_NonAsciiWhitespace> codeNonAsciiWhitespace = const FastaCode<
|
| +const UnboundFastaCode<
|
| + _NonAsciiWhitespace> codeNonAsciiWhitespace = const UnboundFastaCode<
|
| _NonAsciiWhitespace>("NonAsciiWhitespace",
|
| template:
|
| - r"The non-ASCII space character #unicode can only be used in strings and comments.",
|
| + r"""The non-ASCII space character #unicode can only be used in strings and comments.""",
|
| analyzerCode: "ILLEGAL_CHARACTER",
|
| dart2jsCode: "BAD_INPUT_CHARACTER",
|
| - format: _formatNonAsciiWhitespace);
|
| + bind: _bindNonAsciiWhitespace);
|
|
|
| -typedef FastaMessage _NonAsciiWhitespace(
|
| - Uri uri, int charOffset, int codePoint);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _NonAsciiWhitespace = FastaMessage Function(Uri, int) Function(
|
| + int codePoint);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatNonAsciiWhitespace(Uri uri, int charOffset, int codePoint) {
|
| - String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| - return new FastaMessage(uri, charOffset, codeNonAsciiWhitespace,
|
| - message:
|
| - "The non-ASCII space character $unicode can only be used in strings and comments.",
|
| - arguments: {'codePoint': codePoint});
|
| +FastaMessage Function(Uri, int) _bindNonAsciiWhitespace(int codePoint) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| + return new FastaMessage(uri, charOffset, codeNonAsciiWhitespace,
|
| + message:
|
| + """The non-ASCII space character $unicode can only be used in strings and comments.""",
|
| + arguments: {'codePoint': codePoint});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedIdentifier> codeExpectedIdentifier =
|
| - const FastaCode<_ExpectedIdentifier>("ExpectedIdentifier",
|
| - template: r"'#lexeme' is a reserved word and can't be used here.",
|
| - tip: r"Try using a different name.",
|
| +const UnboundFastaCode<_ExpectedIdentifier> codeExpectedIdentifier =
|
| + const UnboundFastaCode<_ExpectedIdentifier>("ExpectedIdentifier",
|
| + template: r"""'#lexeme' is a reserved word and can't be used here.""",
|
| + tip: r"""Try using a different name.""",
|
| dart2jsCode: "EXPECTED_IDENTIFIER",
|
| - format: _formatExpectedIdentifier);
|
| -
|
| -typedef FastaMessage _ExpectedIdentifier(Uri uri, int charOffset, Token token);
|
| + bind: _bindExpectedIdentifier);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedIdentifier(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedIdentifier,
|
| - message: "'$lexeme' is a reserved word and can't be used here.",
|
| - tip: "Try using a different name.",
|
| - arguments: {'token': token});
|
| -}
|
| +typedef _ExpectedIdentifier = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedBlockToSkip> codeExpectedBlockToSkip =
|
| - const FastaCode<_ExpectedBlockToSkip>("ExpectedBlockToSkip",
|
| - template: r"Expected a function body or '=>'.",
|
| - tip: r"Try adding {}.",
|
| - dart2jsCode: "NATIVE_OR_BODY_EXPECTED",
|
| - format: _formatExpectedBlockToSkip);
|
| -
|
| -typedef FastaMessage _ExpectedBlockToSkip(Uri uri, int charOffset);
|
| +FastaMessage Function(Uri, int) _bindExpectedIdentifier(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedIdentifier,
|
| + message: """'$lexeme' is a reserved word and can't be used here.""",
|
| + tip: """Try using a different name.""",
|
| + arguments: {'token': token});
|
| + }
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedBlockToSkip(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeExpectedBlockToSkip,
|
| - message: "Expected a function body or '=>'.",
|
| - tip: "Try adding {}.",
|
| - arguments: {});
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<
|
| - _RequiredParameterWithDefault> codeRequiredParameterWithDefault =
|
| - const FastaCode<_RequiredParameterWithDefault>(
|
| - "RequiredParameterWithDefault",
|
| - template: r"Non-optional parameters can't have a default value.",
|
| - tip:
|
| - r"Try removing the default value or making the parameter optional.",
|
| - dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT",
|
| - format: _formatRequiredParameterWithDefault);
|
| -
|
| -typedef FastaMessage _RequiredParameterWithDefault(Uri uri, int charOffset);
|
| +const BoundFastaCode codeExpectedBlockToSkip = const BoundFastaCode(
|
| + "ExpectedBlockToSkip",
|
| + template: r"""Expected a function body or '=>'.""",
|
| + tip: r"""Try adding {}.""",
|
| + dart2jsCode: "NATIVE_OR_BODY_EXPECTED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatRequiredParameterWithDefault(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeRequiredParameterWithDefault,
|
| - message: "Non-optional parameters can't have a default value.",
|
| - tip: "Try removing the default value or making the parameter optional.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeRequiredParameterWithDefault = const BoundFastaCode(
|
| + "RequiredParameterWithDefault",
|
| + template: r"""Non-optional parameters can't have a default value.""",
|
| + tip:
|
| + r"""Try removing the default value or making the parameter optional.""",
|
| + dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_Unspecified> codeUnspecified = const FastaCode<_Unspecified>(
|
| - "Unspecified",
|
| - template: r"#string",
|
| - dart2jsCode: "GENERIC",
|
| - format: _formatUnspecified);
|
| +const UnboundFastaCode<_Unspecified> codeUnspecified =
|
| + const UnboundFastaCode<_Unspecified>("Unspecified",
|
| + template: r"""#string""",
|
| + dart2jsCode: "GENERIC",
|
| + bind: _bindUnspecified);
|
|
|
| -typedef FastaMessage _Unspecified(Uri uri, int charOffset, String string);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _Unspecified = FastaMessage Function(Uri, int) Function(String string);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnspecified(Uri uri, int charOffset, String string) {
|
| - return new FastaMessage(uri, charOffset, codeUnspecified,
|
| - message: "$string", arguments: {'string': string});
|
| +FastaMessage Function(Uri, int) _bindUnspecified(String string) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeUnspecified,
|
| + message: """$string""", arguments: {'string': string});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_MissingExponent> codeMissingExponent = const FastaCode<
|
| - _MissingExponent>("MissingExponent",
|
| +const BoundFastaCode codeMissingExponent = const BoundFastaCode(
|
| + "MissingExponent",
|
| template:
|
| - r"Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).",
|
| + r"""Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).""",
|
| tip:
|
| - r"Make sure there is an exponent, and remove any whitespace before it.",
|
| + r"""Make sure there is an exponent, and remove any whitespace before it.""",
|
| analyzerCode: "MISSING_DIGIT",
|
| - dart2jsCode: "EXPONENT_MISSING",
|
| - format: _formatMissingExponent);
|
| -
|
| -typedef FastaMessage _MissingExponent(Uri uri, int charOffset);
|
| + dart2jsCode: "EXPONENT_MISSING");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatMissingExponent(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeMissingExponent,
|
| - message:
|
| - "Numbers in exponential notation should always contain an exponent (an integer number with an optional sign).",
|
| - tip:
|
| - "Make sure there is an exponent, and remove any whitespace before it.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codePositionalParameterWithEquals = const BoundFastaCode(
|
| + "PositionalParameterWithEquals",
|
| + template:
|
| + r"""Positional optional parameters can't use ':' to specify a default value.""",
|
| + tip: r"""Try replacing ':' with '='.""",
|
| + dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_PositionalParameterWithEquals>
|
| - codePositionalParameterWithEquals =
|
| - const FastaCode<_PositionalParameterWithEquals>(
|
| - "PositionalParameterWithEquals",
|
| - template:
|
| - r"Positional optional parameters can't use ':' to specify a default value.",
|
| - tip: r"Try replacing ':' with '='.",
|
| - dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS",
|
| - format: _formatPositionalParameterWithEquals);
|
| -
|
| -typedef FastaMessage _PositionalParameterWithEquals(Uri uri, int charOffset);
|
| +const BoundFastaCode codeUnexpectedDollarInString = const BoundFastaCode(
|
| + "UnexpectedDollarInString",
|
| + template:
|
| + r"""A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).""",
|
| + tip: r"""Try adding a backslash (\) to escape the '$'.""",
|
| + dart2jsCode: "MALFORMED_STRING_LITERAL");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatPositionalParameterWithEquals(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codePositionalParameterWithEquals,
|
| - message:
|
| - "Positional optional parameters can't use ':' to specify a default value.",
|
| - tip: "Try replacing ':' with '='.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeFinalFieldWithoutInitializer = const BoundFastaCode(
|
| + "FinalFieldWithoutInitializer",
|
| + template: r"""A 'final' field must be initialized.""",
|
| + tip: r"""Try adding '= <initializer>'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<
|
| - _UnexpectedDollarInString> codeUnexpectedDollarInString = const FastaCode<
|
| - _UnexpectedDollarInString>("UnexpectedDollarInString",
|
| - template:
|
| - r"A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).",
|
| - tip: r"Try adding a backslash (\) to escape the '$'.",
|
| - dart2jsCode: "MALFORMED_STRING_LITERAL",
|
| - format: _formatUnexpectedDollarInString);
|
| -
|
| -typedef FastaMessage _UnexpectedDollarInString(Uri uri, int charOffset);
|
| +const UnboundFastaCode<_ExtraneousModifier> codeExtraneousModifier =
|
| + const UnboundFastaCode<_ExtraneousModifier>("ExtraneousModifier",
|
| + template: r"""Can't have modifier '#lexeme' here.""",
|
| + tip: r"""Try removing '#lexeme'.""",
|
| + dart2jsCode: "EXTRANEOUS_MODIFIER",
|
| + bind: _bindExtraneousModifier);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnexpectedDollarInString(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeUnexpectedDollarInString,
|
| - message:
|
| - "A '\$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}).",
|
| - tip: "Try adding a backslash (\) to escape the '\$'.",
|
| - arguments: {});
|
| -}
|
| +typedef _ExtraneousModifier = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_FinalFieldWithoutInitializer>
|
| - codeFinalFieldWithoutInitializer =
|
| - const FastaCode<_FinalFieldWithoutInitializer>(
|
| - "FinalFieldWithoutInitializer",
|
| - template: r"A 'final' field must be initialized.",
|
| - tip: r"Try adding '= <initializer>'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatFinalFieldWithoutInitializer);
|
| -
|
| -typedef FastaMessage _FinalFieldWithoutInitializer(Uri uri, int charOffset);
|
| +FastaMessage Function(Uri, int) _bindExtraneousModifier(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExtraneousModifier,
|
| + message: """Can't have modifier '$lexeme' here.""",
|
| + tip: """Try removing '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatFinalFieldWithoutInitializer(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeFinalFieldWithoutInitializer,
|
| - message: "A 'final' field must be initialized.",
|
| - tip: "Try adding '= <initializer>'.",
|
| - arguments: {});
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExtraneousModifier> codeExtraneousModifier =
|
| - const FastaCode<_ExtraneousModifier>("ExtraneousModifier",
|
| - template: r"Can't have modifier '#lexeme' here.",
|
| - tip: r"Try removing '#lexeme'.",
|
| - dart2jsCode: "EXTRANEOUS_MODIFIER",
|
| - format: _formatExtraneousModifier);
|
| -
|
| -typedef FastaMessage _ExtraneousModifier(Uri uri, int charOffset, Token token);
|
| +const BoundFastaCode codeEmptyOptionalParameterList = const BoundFastaCode(
|
| + "EmptyOptionalParameterList",
|
| + template: r"""Optional parameter lists cannot be empty.""",
|
| + tip: r"""Try adding an optional parameter to the list.""",
|
| + dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExtraneousModifier(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExtraneousModifier,
|
| - message: "Can't have modifier '$lexeme' here.",
|
| - tip: "Try removing '$lexeme'.",
|
| - arguments: {'token': token});
|
| -}
|
| +const UnboundFastaCode<_TypeNotFound> codeTypeNotFound =
|
| + const UnboundFastaCode<_TypeNotFound>("TypeNotFound",
|
| + template: r"""Type '#name' not found.""", bind: _bindTypeNotFound);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_EmptyOptionalParameterList> codeEmptyOptionalParameterList =
|
| - const FastaCode<_EmptyOptionalParameterList>("EmptyOptionalParameterList",
|
| - template: r"Optional parameter lists cannot be empty.",
|
| - tip: r"Try adding an optional parameter to the list.",
|
| - dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST",
|
| - format: _formatEmptyOptionalParameterList);
|
| -
|
| -typedef FastaMessage _EmptyOptionalParameterList(Uri uri, int charOffset);
|
| +typedef _TypeNotFound = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatEmptyOptionalParameterList(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeEmptyOptionalParameterList,
|
| - message: "Optional parameter lists cannot be empty.",
|
| - tip: "Try adding an optional parameter to the list.",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindTypeNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeTypeNotFound,
|
| + message: """Type '$name' not found.""", arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnterminatedString> codeUnterminatedString =
|
| - const FastaCode<_UnterminatedString>("UnterminatedString",
|
| - template: r"String must end with #string.",
|
| +const UnboundFastaCode<_UnterminatedString> codeUnterminatedString =
|
| + const UnboundFastaCode<_UnterminatedString>("UnterminatedString",
|
| + template: r"""String must end with #string.""",
|
| analyzerCode: "UNTERMINATED_STRING_LITERAL",
|
| dart2jsCode: "UNTERMINATED_STRING",
|
| - format: _formatUnterminatedString);
|
| -
|
| -typedef FastaMessage _UnterminatedString(
|
| - Uri uri, int charOffset, String string);
|
| + bind: _bindUnterminatedString);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnterminatedString(Uri uri, int charOffset, String string) {
|
| - return new FastaMessage(uri, charOffset, codeUnterminatedString,
|
| - message: "String must end with $string.", arguments: {'string': string});
|
| -}
|
| +typedef _UnterminatedString = FastaMessage Function(Uri, int) Function(
|
| + String string);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AwaitNotAsync> codeAwaitNotAsync =
|
| - const FastaCode<_AwaitNotAsync>("AwaitNotAsync",
|
| - template: r"'await' can only be used in 'async' or 'async*' methods.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatAwaitNotAsync);
|
| +FastaMessage Function(Uri, int) _bindUnterminatedString(String string) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeUnterminatedString,
|
| + message: """String must end with $string.""",
|
| + arguments: {'string': string});
|
| + }
|
|
|
| -typedef FastaMessage _AwaitNotAsync(Uri uri, int charOffset);
|
| + return bind;
|
| +}
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAwaitNotAsync(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAwaitNotAsync,
|
| - message: "'await' can only be used in 'async' or 'async*' methods.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeAwaitNotAsync = const BoundFastaCode("AwaitNotAsync",
|
| + template: r"""'await' can only be used in 'async' or 'async*' methods.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedFunctionBody> codeExpectedFunctionBody =
|
| - const FastaCode<_ExpectedFunctionBody>("ExpectedFunctionBody",
|
| - template: r"Expected a function body, but got '#lexeme'.",
|
| +const UnboundFastaCode<_ExpectedFunctionBody> codeExpectedFunctionBody =
|
| + const UnboundFastaCode<_ExpectedFunctionBody>("ExpectedFunctionBody",
|
| + template: r"""Expected a function body, but got '#lexeme'.""",
|
| dart2jsCode: "NATIVE_OR_FATAL",
|
| - format: _formatExpectedFunctionBody);
|
| + bind: _bindExpectedFunctionBody);
|
|
|
| -typedef FastaMessage _ExpectedFunctionBody(
|
| - Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ExpectedFunctionBody = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedFunctionBody(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedFunctionBody,
|
| - message: "Expected a function body, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindExpectedFunctionBody(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedFunctionBody,
|
| + message: """Expected a function body, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedHexDigit> codeExpectedHexDigit =
|
| - const FastaCode<_ExpectedHexDigit>("ExpectedHexDigit",
|
| - template: r"A hex digit (0-9 or A-F) must follow '0x'.",
|
| - analyzerCode: "MISSING_HEX_DIGIT",
|
| - dart2jsCode: "HEX_DIGIT_EXPECTED",
|
| - format: _formatExpectedHexDigit);
|
| +const BoundFastaCode codeExpectedHexDigit = const BoundFastaCode(
|
| + "ExpectedHexDigit",
|
| + template: r"""A hex digit (0-9 or A-F) must follow '0x'.""",
|
| + analyzerCode: "MISSING_HEX_DIGIT",
|
| + dart2jsCode: "HEX_DIGIT_EXPECTED");
|
|
|
| -typedef FastaMessage _ExpectedHexDigit(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const BoundFastaCode codeEmptyNamedParameterList = const BoundFastaCode(
|
| + "EmptyNamedParameterList",
|
| + template: r"""Named parameter lists cannot be empty.""",
|
| + tip: r"""Try adding a named parameter to the list.""",
|
| + dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedHexDigit(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeExpectedHexDigit,
|
| - message: "A hex digit (0-9 or A-F) must follow '0x'.", arguments: {});
|
| -}
|
| +const BoundFastaCode codeUnsupportedPrefixPlus = const BoundFastaCode(
|
| + "UnsupportedPrefixPlus",
|
| + template: r"""'+' is not a prefix operator. """,
|
| + tip: r"""Try removing '+'.""",
|
| + dart2jsCode: "UNSUPPORTED_PREFIX_PLUS");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_EmptyNamedParameterList> codeEmptyNamedParameterList =
|
| - const FastaCode<_EmptyNamedParameterList>("EmptyNamedParameterList",
|
| - template: r"Named parameter lists cannot be empty.",
|
| - tip: r"Try adding a named parameter to the list.",
|
| - dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST",
|
| - format: _formatEmptyNamedParameterList);
|
| +const UnboundFastaCode<_ExpectedString> codeExpectedString =
|
| + const UnboundFastaCode<_ExpectedString>("ExpectedString",
|
| + template: r"""Expected a String, but got '#lexeme'.""",
|
| + dart2jsCode: "FASTA_FATAL",
|
| + bind: _bindExpectedString);
|
|
|
| -typedef FastaMessage _EmptyNamedParameterList(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ExpectedString = FastaMessage Function(Uri, int) Function(Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatEmptyNamedParameterList(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeEmptyNamedParameterList,
|
| - message: "Named parameter lists cannot be empty.",
|
| - tip: "Try adding a named parameter to the list.",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindExpectedString(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedString,
|
| + message: """Expected a String, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnsupportedPrefixPlus> codeUnsupportedPrefixPlus =
|
| - const FastaCode<_UnsupportedPrefixPlus>("UnsupportedPrefixPlus",
|
| - template: r"'+' is not a prefix operator. ",
|
| - tip: r"Try removing '+'.",
|
| - dart2jsCode: "UNSUPPORTED_PREFIX_PLUS",
|
| - format: _formatUnsupportedPrefixPlus);
|
| +const BoundFastaCode codeFastaUsageShort =
|
| + const BoundFastaCode("FastaUsageShort",
|
| + template: r"""Frequently used options:
|
|
|
| -typedef FastaMessage _UnsupportedPrefixPlus(Uri uri, int charOffset);
|
| + -o <file> Generate the output into <file>.
|
| + -h Display this message (add -v for information about all options).""");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnsupportedPrefixPlus(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeUnsupportedPrefixPlus,
|
| - message: "'+' is not a prefix operator. ",
|
| - tip: "Try removing '+'.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeTypeAfterVar = const BoundFastaCode("TypeAfterVar",
|
| + template: r"""Can't have both a type and 'var'.""",
|
| + tip: r"""Try removing 'var.'""",
|
| + dart2jsCode: "EXTRANEOUS_MODIFIER");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedString> codeExpectedString =
|
| - const FastaCode<_ExpectedString>("ExpectedString",
|
| - template: r"Expected a String, but got '#lexeme'.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedString);
|
| +const UnboundFastaCode<_AbstractClassInstantiation>
|
| + codeAbstractClassInstantiation =
|
| + const UnboundFastaCode<_AbstractClassInstantiation>(
|
| + "AbstractClassInstantiation",
|
| + template:
|
| + r"""The class '#name' is abstract and can't be instantiated.""",
|
| + bind: _bindAbstractClassInstantiation);
|
|
|
| -typedef FastaMessage _ExpectedString(Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _AbstractClassInstantiation = FastaMessage Function(Uri, int) Function(
|
| + String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedString(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedString,
|
| - message: "Expected a String, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindAbstractClassInstantiation(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeAbstractClassInstantiation,
|
| + message: """The class '$name' is abstract and can't be instantiated.""",
|
| + arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_TypeAfterVar> codeTypeAfterVar =
|
| - const FastaCode<_TypeAfterVar>("TypeAfterVar",
|
| - template: r"Can't have both a type and 'var'.",
|
| - tip: r"Try removing 'var.'",
|
| - dart2jsCode: "EXTRANEOUS_MODIFIER",
|
| - format: _formatTypeAfterVar);
|
| +const BoundFastaCode codeAbstractNotSync = const BoundFastaCode(
|
| + "AbstractNotSync",
|
| + template: r"""Abstract methods can't use 'async', 'async*', or 'sync*'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
| +
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const UnboundFastaCode<_GetterNotFound> codeGetterNotFound =
|
| + const UnboundFastaCode<_GetterNotFound>("GetterNotFound",
|
| + template: r"""Getter not found: '#name'.""", bind: _bindGetterNotFound);
|
|
|
| -typedef FastaMessage _TypeAfterVar(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _GetterNotFound = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatTypeAfterVar(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeTypeAfterVar,
|
| - message: "Can't have both a type and 'var'.",
|
| - tip: "Try removing 'var.'",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindGetterNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeGetterNotFound,
|
| + message: """Getter not found: '$name'.""", arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AbstractNotSync> codeAbstractNotSync =
|
| - const FastaCode<_AbstractNotSync>("AbstractNotSync",
|
| - template: r"Abstract methods can't use 'async', 'async*', or 'sync*'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatAbstractNotSync);
|
| +const BoundFastaCode codeListLiteralTooManyTypeArguments = const BoundFastaCode(
|
| + "ListLiteralTooManyTypeArguments",
|
| + template: r"""Too many type arguments on List literal.""");
|
|
|
| -typedef FastaMessage _AbstractNotSync(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const UnboundFastaCode<_ExpectedDeclaration> codeExpectedDeclaration =
|
| + const UnboundFastaCode<_ExpectedDeclaration>("ExpectedDeclaration",
|
| + template: r"""Expected a declaration, but got '#lexeme'.""",
|
| + dart2jsCode: "FASTA_FATAL",
|
| + bind: _bindExpectedDeclaration);
|
| +
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ExpectedDeclaration = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAbstractNotSync(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAbstractNotSync,
|
| - message: "Abstract methods can't use 'async', 'async*', or 'sync*'.",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindExpectedDeclaration(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedDeclaration,
|
| + message: """Expected a declaration, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedDeclaration> codeExpectedDeclaration =
|
| - const FastaCode<_ExpectedDeclaration>("ExpectedDeclaration",
|
| - template: r"Expected a declaration, but got '#lexeme'.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedDeclaration);
|
| +const UnboundFastaCode<_ConstructorNotFound> codeConstructorNotFound =
|
| + const UnboundFastaCode<_ConstructorNotFound>("ConstructorNotFound",
|
| + template: r"""Couldn't find constructor '#name'.""",
|
| + bind: _bindConstructorNotFound);
|
|
|
| -typedef FastaMessage _ExpectedDeclaration(Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ConstructorNotFound = FastaMessage Function(Uri, int) Function(
|
| + String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedDeclaration(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedDeclaration,
|
| - message: "Expected a declaration, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindConstructorNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeConstructorNotFound,
|
| + message: """Couldn't find constructor '$name'.""",
|
| + arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<
|
| - _AsciiControlCharacter> codeAsciiControlCharacter = const FastaCode<
|
| +const UnboundFastaCode<
|
| + _AsciiControlCharacter> codeAsciiControlCharacter = const UnboundFastaCode<
|
| _AsciiControlCharacter>("AsciiControlCharacter",
|
| template:
|
| - r"The control character #unicode can only be used in strings and comments.",
|
| + r"""The control character #unicode can only be used in strings and comments.""",
|
| dart2jsCode: "BAD_INPUT_CHARACTER",
|
| - format: _formatAsciiControlCharacter);
|
| + bind: _bindAsciiControlCharacter);
|
|
|
| -typedef FastaMessage _AsciiControlCharacter(
|
| - Uri uri, int charOffset, int codePoint);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _AsciiControlCharacter = FastaMessage Function(Uri, int) Function(
|
| + int codePoint);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAsciiControlCharacter(
|
| - Uri uri, int charOffset, int codePoint) {
|
| - String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| - return new FastaMessage(uri, charOffset, codeAsciiControlCharacter,
|
| - message:
|
| - "The control character $unicode can only be used in strings and comments.",
|
| - arguments: {'codePoint': codePoint});
|
| +FastaMessage Function(Uri, int) _bindAsciiControlCharacter(int codePoint) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| + return new FastaMessage(uri, charOffset, codeAsciiControlCharacter,
|
| + message:
|
| + """The control character $unicode can only be used in strings and comments.""",
|
| + arguments: {'codePoint': codePoint});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnmatchedToken> codeUnmatchedToken =
|
| - const FastaCode<_UnmatchedToken>("UnmatchedToken",
|
| - template: r"Can't find '#string' to match '#lexeme'.",
|
| +const UnboundFastaCode<_UnmatchedToken> codeUnmatchedToken =
|
| + const UnboundFastaCode<_UnmatchedToken>("UnmatchedToken",
|
| + template: r"""Can't find '#string' to match '#lexeme'.""",
|
| dart2jsCode: "UNMATCHED_TOKEN",
|
| - format: _formatUnmatchedToken);
|
| + bind: _bindUnmatchedToken);
|
|
|
| -typedef FastaMessage _UnmatchedToken(
|
| - Uri uri, int charOffset, String string, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _UnmatchedToken = FastaMessage Function(Uri, int) Function(
|
| + String string, Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnmatchedToken(
|
| - Uri uri, int charOffset, String string, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeUnmatchedToken,
|
| - message: "Can't find '$string' to match '$lexeme'.",
|
| - arguments: {'string': string, 'token': token});
|
| +FastaMessage Function(Uri, int) _bindUnmatchedToken(
|
| + String string, Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeUnmatchedToken,
|
| + message: """Can't find '$string' to match '$lexeme'.""",
|
| + arguments: {'string': string, 'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_InvalidSyncModifier> codeInvalidSyncModifier =
|
| - const FastaCode<_InvalidSyncModifier>("InvalidSyncModifier",
|
| - template: r"Invalid modifier 'sync'.",
|
| - tip: r"Try replacing 'sync' with 'sync*'.",
|
| - dart2jsCode: "INVALID_SYNC_MODIFIER",
|
| - format: _formatInvalidSyncModifier);
|
| +const BoundFastaCode codeInvalidSyncModifier = const BoundFastaCode(
|
| + "InvalidSyncModifier",
|
| + template: r"""Invalid modifier 'sync'.""",
|
| + tip: r"""Try replacing 'sync' with 'sync*'.""",
|
| + dart2jsCode: "INVALID_SYNC_MODIFIER");
|
|
|
| -typedef FastaMessage _InvalidSyncModifier(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const UnboundFastaCode<_FastaCLIArgumentRequired> codeFastaCLIArgumentRequired =
|
| + const UnboundFastaCode<_FastaCLIArgumentRequired>(
|
| + "FastaCLIArgumentRequired",
|
| + template: r"""Expected value after '#name'.""",
|
| + bind: _bindFastaCLIArgumentRequired);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatInvalidSyncModifier(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeInvalidSyncModifier,
|
| - message: "Invalid modifier 'sync'.",
|
| - tip: "Try replacing 'sync' with 'sync*'.",
|
| - arguments: {});
|
| -}
|
| +typedef _FastaCLIArgumentRequired = FastaMessage Function(Uri, int) Function(
|
| + String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_GetterWithFormals> codeGetterWithFormals =
|
| - const FastaCode<_GetterWithFormals>("GetterWithFormals",
|
| - template: r"A getter can't have formal parameters.",
|
| - tip: r"Try removing '(...)'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatGetterWithFormals);
|
| +FastaMessage Function(Uri, int) _bindFastaCLIArgumentRequired(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeFastaCLIArgumentRequired,
|
| + message: """Expected value after '$name'.""",
|
| + arguments: {'name': name});
|
| + }
|
|
|
| -typedef FastaMessage _GetterWithFormals(Uri uri, int charOffset);
|
| + return bind;
|
| +}
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatGetterWithFormals(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeGetterWithFormals,
|
| - message: "A getter can't have formal parameters.",
|
| - tip: "Try removing '(...)'.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeGetterWithFormals = const BoundFastaCode(
|
| + "GetterWithFormals",
|
| + template: r"""A getter can't have formal parameters.""",
|
| + tip: r"""Try removing '(...)'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_NoFormals> codeNoFormals = const FastaCode<_NoFormals>(
|
| - "NoFormals",
|
| - template: r"A function should have formal parameters.",
|
| +const UnboundFastaCode<_NoFormals> codeNoFormals = const UnboundFastaCode<
|
| + _NoFormals>("NoFormals",
|
| + template: r"""A function should have formal parameters.""",
|
| tip:
|
| - r"Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter.",
|
| + r"""Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to declare a getter.""",
|
| dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatNoFormals);
|
| -
|
| -typedef FastaMessage _NoFormals(Uri uri, int charOffset, Token token);
|
| + bind: _bindNoFormals);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatNoFormals(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeNoFormals,
|
| - message: "A function should have formal parameters.",
|
| - tip:
|
| - "Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to declare a getter.",
|
| - arguments: {'token': token});
|
| -}
|
| +typedef _NoFormals = FastaMessage Function(Uri, int) Function(Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedOpenParens> codeExpectedOpenParens =
|
| - const FastaCode<_ExpectedOpenParens>("ExpectedOpenParens",
|
| - template: r"Expected '('.",
|
| - dart2jsCode: "GENERIC",
|
| - format: _formatExpectedOpenParens);
|
| -
|
| -typedef FastaMessage _ExpectedOpenParens(Uri uri, int charOffset);
|
| +FastaMessage Function(Uri, int) _bindNoFormals(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeNoFormals,
|
| + message: """A function should have formal parameters.""",
|
| + tip:
|
| + """Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to declare a getter.""",
|
| + arguments: {'token': token});
|
| + }
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedOpenParens(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeExpectedOpenParens,
|
| - message: "Expected '('.", arguments: {});
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnterminatedComment> codeUnterminatedComment =
|
| - const FastaCode<_UnterminatedComment>("UnterminatedComment",
|
| - template: r"Comment starting with '/*' must end with '*/'.",
|
| - analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT",
|
| - dart2jsCode: "UNTERMINATED_COMMENT",
|
| - format: _formatUnterminatedComment);
|
| -
|
| -typedef FastaMessage _UnterminatedComment(Uri uri, int charOffset);
|
| +const BoundFastaCode codeExpectedOpenParens = const BoundFastaCode(
|
| + "ExpectedOpenParens",
|
| + template: r"""Expected '('.""",
|
| + dart2jsCode: "GENERIC");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnterminatedComment(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeUnterminatedComment,
|
| - message: "Comment starting with '/*' must end with '*/'.", arguments: {});
|
| -}
|
| +const BoundFastaCode codeUnterminatedComment = const BoundFastaCode(
|
| + "UnterminatedComment",
|
| + template: r"""Comment starting with '/*' must end with '*/'.""",
|
| + analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT",
|
| + dart2jsCode: "UNTERMINATED_COMMENT");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_CatchSyntax> codeCatchSyntax = const FastaCode<_CatchSyntax>(
|
| - "CatchSyntax",
|
| +const BoundFastaCode codeCatchSyntax = const BoundFastaCode("CatchSyntax",
|
| template:
|
| - r"'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
|
| + r"""'catch' must be followed by '(identifier)' or '(identifier, identifier)'.""",
|
| tip:
|
| - r"No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatCatchSyntax);
|
| + r"""No types are needed, the first is given by 'on', the second is always 'StackTrace'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
| +
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const UnboundFastaCode<_ExpectedClassBody> codeExpectedClassBody =
|
| + const UnboundFastaCode<_ExpectedClassBody>("ExpectedClassBody",
|
| + template: r"""Expected a class body, but got '#lexeme'.""",
|
| + dart2jsCode: "FASTA_FATAL",
|
| + bind: _bindExpectedClassBody);
|
|
|
| -typedef FastaMessage _CatchSyntax(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ExpectedClassBody = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatCatchSyntax(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeCatchSyntax,
|
| - message:
|
| - "'catch' must be followed by '(identifier)' or '(identifier, identifier)'.",
|
| - tip:
|
| - "No types are needed, the first is given by 'on', the second is always 'StackTrace'.",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindExpectedClassBody(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedClassBody,
|
| + message: """Expected a class body, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedClassBody> codeExpectedClassBody =
|
| - const FastaCode<_ExpectedClassBody>("ExpectedClassBody",
|
| - template: r"Expected a class body, but got '#lexeme'.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedClassBody);
|
| +const UnboundFastaCode<_NotAType> codeNotAType =
|
| + const UnboundFastaCode<_NotAType>("NotAType",
|
| + template: r"""'#name' isn't a type.""", bind: _bindNotAType);
|
|
|
| -typedef FastaMessage _ExpectedClassBody(Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _NotAType = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedClassBody(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedClassBody,
|
| - message: "Expected a class body, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindNotAType(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeNotAType,
|
| + message: """'$name' isn't a type.""", arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedExpression> codeExpectedExpression =
|
| - const FastaCode<_ExpectedExpression>("ExpectedExpression",
|
| - template: r"Expected an expression, but got '#lexeme'.",
|
| +const UnboundFastaCode<_ExpectedExpression> codeExpectedExpression =
|
| + const UnboundFastaCode<_ExpectedExpression>("ExpectedExpression",
|
| + template: r"""Expected an expression, but got '#lexeme'.""",
|
| dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedExpression);
|
| + bind: _bindExpectedExpression);
|
|
|
| -typedef FastaMessage _ExpectedExpression(Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _ExpectedExpression = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedExpression(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedExpression,
|
| - message: "Expected an expression, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindExpectedExpression(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedExpression,
|
| + message: """Expected an expression, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_InvalidAwaitFor> codeInvalidAwaitFor = const FastaCode<
|
| - _InvalidAwaitFor>("InvalidAwaitFor",
|
| +const BoundFastaCode codeInvalidAwaitFor = const BoundFastaCode(
|
| + "InvalidAwaitFor",
|
| template:
|
| - r"'await' is only supported in methods with an 'async' or 'async*' body modifier.",
|
| + r"""'await' is only supported in methods with an 'async' or 'async*' body modifier.""",
|
| tip:
|
| - r"Try adding 'async' or 'async*' to the method body or removing the 'await' keyword.",
|
| - dart2jsCode: "INVALID_AWAIT_FOR",
|
| - format: _formatInvalidAwaitFor);
|
| + r"""Try adding 'async' or 'async*' to the method body or removing the 'await' keyword.""",
|
| + dart2jsCode: "INVALID_AWAIT_FOR");
|
|
|
| -typedef FastaMessage _InvalidAwaitFor(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const UnboundFastaCode<_ExpectedType> codeExpectedType =
|
| + const UnboundFastaCode<_ExpectedType>("ExpectedType",
|
| + template: r"""Expected a type, but got '#lexeme'.""",
|
| + dart2jsCode: "FASTA_FATAL",
|
| + bind: _bindExpectedType);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatInvalidAwaitFor(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeInvalidAwaitFor,
|
| - message:
|
| - "'await' is only supported in methods with an 'async' or 'async*' body modifier.",
|
| - tip:
|
| - "Try adding 'async' or 'async*' to the method body or removing the 'await' keyword.",
|
| - arguments: {});
|
| -}
|
| +typedef _ExpectedType = FastaMessage Function(Uri, int) Function(Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedType> codeExpectedType =
|
| - const FastaCode<_ExpectedType>("ExpectedType",
|
| - template: r"Expected a type, but got '#lexeme'.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatExpectedType);
|
| +FastaMessage Function(Uri, int) _bindExpectedType(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeExpectedType,
|
| + message: """Expected a type, but got '$lexeme'.""",
|
| + arguments: {'token': token});
|
| + }
|
|
|
| -typedef FastaMessage _ExpectedType(Uri uri, int charOffset, Token token);
|
| + return bind;
|
| +}
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedType(Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeExpectedType,
|
| - message: "Expected a type, but got '$lexeme'.",
|
| - arguments: {'token': token});
|
| -}
|
| +const BoundFastaCode codeUnterminatedToken = const BoundFastaCode(
|
| + "UnterminatedToken",
|
| + template: r"""Incomplete token.""",
|
| + dart2jsCode: "UNTERMINATED_TOKEN");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_UnterminatedToken> codeUnterminatedToken =
|
| - const FastaCode<_UnterminatedToken>("UnterminatedToken",
|
| - template: r"Incomplete token.",
|
| - dart2jsCode: "UNTERMINATED_TOKEN",
|
| - format: _formatUnterminatedToken);
|
| +const UnboundFastaCode<_SetterNotFound> codeSetterNotFound =
|
| + const UnboundFastaCode<_SetterNotFound>("SetterNotFound",
|
| + template: r"""Setter not found: '#name'.""", bind: _bindSetterNotFound);
|
|
|
| -typedef FastaMessage _UnterminatedToken(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _SetterNotFound = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatUnterminatedToken(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeUnterminatedToken,
|
| - message: "Incomplete token.", arguments: {});
|
| +FastaMessage Function(Uri, int) _bindSetterNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeSetterNotFound,
|
| + message: """Setter not found: '$name'.""", arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedButGot> codeExpectedButGot =
|
| - const FastaCode<_ExpectedButGot>("ExpectedButGot",
|
| - template: r"Expected '#string' before this.",
|
| - tip: r"DONT_KNOW_HOW_TO_FIX,",
|
| +const UnboundFastaCode<_ExpectedButGot> codeExpectedButGot =
|
| + const UnboundFastaCode<_ExpectedButGot>("ExpectedButGot",
|
| + template: r"""Expected '#string' before this.""",
|
| + tip: r"""DONT_KNOW_HOW_TO_FIX,""",
|
| dart2jsCode: "MISSING_TOKEN_BEFORE_THIS",
|
| - format: _formatExpectedButGot);
|
| -
|
| -typedef FastaMessage _ExpectedButGot(Uri uri, int charOffset, String string);
|
| + bind: _bindExpectedButGot);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedButGot(Uri uri, int charOffset, String string) {
|
| - return new FastaMessage(uri, charOffset, codeExpectedButGot,
|
| - message: "Expected '$string' before this.",
|
| - tip: "DONT_KNOW_HOW_TO_FIX,",
|
| - arguments: {'string': string});
|
| -}
|
| +typedef _ExpectedButGot = FastaMessage Function(Uri, int) Function(
|
| + String string);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ConstFieldWithoutInitializer>
|
| - codeConstFieldWithoutInitializer =
|
| - const FastaCode<_ConstFieldWithoutInitializer>(
|
| - "ConstFieldWithoutInitializer",
|
| - template: r"A 'const' field must be initialized.",
|
| - tip: r"Try adding '= <initializer>'.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatConstFieldWithoutInitializer);
|
| +FastaMessage Function(Uri, int) _bindExpectedButGot(String string) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeExpectedButGot,
|
| + message: """Expected '$string' before this.""",
|
| + tip: """DONT_KNOW_HOW_TO_FIX,""",
|
| + arguments: {'string': string});
|
| + }
|
|
|
| -typedef FastaMessage _ConstFieldWithoutInitializer(Uri uri, int charOffset);
|
| + return bind;
|
| +}
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatConstFieldWithoutInitializer(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeConstFieldWithoutInitializer,
|
| - message: "A 'const' field must be initialized.",
|
| - tip: "Try adding '= <initializer>'.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeConstFieldWithoutInitializer = const BoundFastaCode(
|
| + "ConstFieldWithoutInitializer",
|
| + template: r"""A 'const' field must be initialized.""",
|
| + tip: r"""Try adding '= <initializer>'.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AwaitForNotAsync> codeAwaitForNotAsync = const FastaCode<
|
| - _AwaitForNotAsync>("AwaitForNotAsync",
|
| - template:
|
| - r"Asynchronous for-loop can only be used in 'async' or 'async*' methods.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatAwaitForNotAsync);
|
| +const BoundFastaCode codeFastaUsageLong = const BoundFastaCode("FastaUsageLong",
|
| + template: r"""Supported options:
|
|
|
| -typedef FastaMessage _AwaitForNotAsync(Uri uri, int charOffset);
|
| + -o <file>, --output=<file>
|
| + Generate the output into <file>.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAwaitForNotAsync(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAwaitForNotAsync,
|
| - message:
|
| - "Asynchronous for-loop can only be used in 'async' or 'async*' methods.",
|
| - arguments: {});
|
| -}
|
| + -h, /h, /?, --help
|
| + Display this message (add -v for information about all options).
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_Encoding> codeEncoding = const FastaCode<_Encoding>("Encoding",
|
| - template: r"Unable to decode bytes as UTF-8.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatEncoding);
|
| + -v, --verbose
|
| + Display verbose information.
|
|
|
| -typedef FastaMessage _Encoding(Uri uri, int charOffset);
|
| + --
|
| + Stop option parsing, the rest of the command line is assumed to be
|
| + file names or arguments to the Dart program.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatEncoding(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeEncoding,
|
| - message: "Unable to decode bytes as UTF-8.", arguments: {});
|
| -}
|
| + --packages=<file>
|
| + Use package resolution configuration <file>, which should contain a mapping
|
| + of package names to paths.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AsyncAsIdentifier> codeAsyncAsIdentifier = const FastaCode<
|
| - _AsyncAsIdentifier>("AsyncAsIdentifier",
|
| - template:
|
| - r"'async' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
|
| - dart2jsCode: "GENERIC",
|
| - format: _formatAsyncAsIdentifier);
|
| + --platform=<file>
|
| + Read the SDK platform from <file>, which should be in Dill/Kernel IR format
|
| + and contain the Dart SDK.
|
|
|
| -typedef FastaMessage _AsyncAsIdentifier(Uri uri, int charOffset);
|
| + --verify
|
| + Check that the generated output is free of various problems. This is mostly
|
| + useful for developers of this compiler or Kernel transformations.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAsyncAsIdentifier(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAsyncAsIdentifier,
|
| - message:
|
| - "'async' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - arguments: {});
|
| -}
|
| + --dump-ir
|
| + Print compiled libraries in Kernel source notation.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_YieldAsIdentifier> codeYieldAsIdentifier = const FastaCode<
|
| - _YieldAsIdentifier>("YieldAsIdentifier",
|
| - template:
|
| - r"'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatYieldAsIdentifier);
|
| + --exclude-source
|
| + Do not include source code in the dill file.
|
|
|
| -typedef FastaMessage _YieldAsIdentifier(Uri uri, int charOffset);
|
| + --compile-sdk=<patched_sdk>
|
| + Compile the SDK from scratch instead of reading it from 'platform.dill'.
|
|
|
| -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatYieldAsIdentifier(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeYieldAsIdentifier,
|
| - message:
|
| - "'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.",
|
| - arguments: {});
|
| -}
|
| + --fatal=errors
|
| + --fatal=warnings
|
| + --fatal=nits
|
| + Makes messages of the given kinds fatal, that is, immediately stop the
|
| + compiler with a non-zero exit-code. In --verbose mode, also display an
|
| + internal stack trace from the compiler. Multiple kinds can be separated by
|
| + commas, for example, --fatal=errors,warnings.""");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_AssertAsExpression> codeAssertAsExpression =
|
| - const FastaCode<_AssertAsExpression>("AssertAsExpression",
|
| - template: r"`assert` can't be used as an expression.",
|
| - dart2jsCode: "FASTA_FATAL",
|
| - format: _formatAssertAsExpression);
|
| +const BoundFastaCode codeAwaitForNotAsync = const BoundFastaCode(
|
| + "AwaitForNotAsync",
|
| + template:
|
| + r"""Asynchronous for-loop can only be used in 'async' or 'async*' methods.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| -typedef FastaMessage _AssertAsExpression(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const BoundFastaCode codeEncoding = const BoundFastaCode("Encoding",
|
| + template: r"""Unable to decode bytes as UTF-8.""",
|
| + dart2jsCode: "FASTA_FATAL");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatAssertAsExpression(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeAssertAsExpression,
|
| - message: "`assert` can't be used as an expression.", arguments: {});
|
| -}
|
| +const BoundFastaCode codeAsyncAsIdentifier = const BoundFastaCode(
|
| + "AsyncAsIdentifier",
|
| + template:
|
| + r"""'async' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""",
|
| + analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER",
|
| + dart2jsCode: "GENERIC");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_OnlyTry> codeOnlyTry = const FastaCode<_OnlyTry>("OnlyTry",
|
| +const BoundFastaCode codeYieldAsIdentifier = const BoundFastaCode(
|
| + "YieldAsIdentifier",
|
| template:
|
| - r"Try block should be followed by 'on', 'catch', or 'finally' block.",
|
| - tip: r"Did you forget to add a 'finally' block?",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatOnlyTry);
|
| + r"""'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| -typedef FastaMessage _OnlyTry(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +const BoundFastaCode codeAssertAsExpression = const BoundFastaCode(
|
| + "AssertAsExpression",
|
| + template: r"""`assert` can't be used as an expression.""",
|
| + dart2jsCode: "FASTA_FATAL");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatOnlyTry(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeOnlyTry,
|
| - message:
|
| - "Try block should be followed by 'on', 'catch', or 'finally' block.",
|
| - tip: "Did you forget to add a 'finally' block?",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeOnlyTry = const BoundFastaCode("OnlyTry",
|
| + template:
|
| + r"""Try block should be followed by 'on', 'catch', or 'finally' block.""",
|
| + tip: r"""Did you forget to add a 'finally' block?""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<
|
| - _InvalidInlineFunctionType> codeInvalidInlineFunctionType = const FastaCode<
|
| - _InvalidInlineFunctionType>("InvalidInlineFunctionType",
|
| - template: r"Invalid inline function type.",
|
| +const BoundFastaCode codeInvalidInlineFunctionType = const BoundFastaCode(
|
| + "InvalidInlineFunctionType",
|
| + template: r"""Invalid inline function type.""",
|
| tip:
|
| - r"Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').",
|
| - dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE",
|
| - format: _formatInvalidInlineFunctionType);
|
| -
|
| -typedef FastaMessage _InvalidInlineFunctionType(Uri uri, int charOffset);
|
| + r"""Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').""",
|
| + dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatInvalidInlineFunctionType(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeInvalidInlineFunctionType,
|
| - message: "Invalid inline function type.",
|
| - tip:
|
| - "Try changing the inline function type (as in 'int f()') to a prefixed function type using the `Function` keyword (as in 'int Function() f').",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeMetadataTypeArguments = const BoundFastaCode(
|
| + "MetadataTypeArguments",
|
| + template: r"""An annotation (metadata) can't use type arguments.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_MetadataTypeArguments> codeMetadataTypeArguments =
|
| - const FastaCode<_MetadataTypeArguments>("MetadataTypeArguments",
|
| - template: r"An annotation (metadata) can't use type arguments.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatMetadataTypeArguments);
|
| -
|
| -typedef FastaMessage _MetadataTypeArguments(Uri uri, int charOffset);
|
| +const BoundFastaCode codeExpectedBody = const BoundFastaCode("ExpectedBody",
|
| + template: r"""Expected a function body or '=>'.""",
|
| + tip: r"""Try adding {}.""",
|
| + dart2jsCode: "BODY_EXPECTED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatMetadataTypeArguments(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeMetadataTypeArguments,
|
| - message: "An annotation (metadata) can't use type arguments.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeTypeRequired = const BoundFastaCode("TypeRequired",
|
| + template: r"""A type or modifier is required here.""",
|
| + tip: r"""Try adding a type, 'var', 'const', or 'final'.""");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_ExpectedBody> codeExpectedBody =
|
| - const FastaCode<_ExpectedBody>("ExpectedBody",
|
| - template: r"Expected a function body or '=>'.",
|
| - tip: r"Try adding {}.",
|
| - dart2jsCode: "BODY_EXPECTED",
|
| - format: _formatExpectedBody);
|
| -
|
| -typedef FastaMessage _ExpectedBody(Uri uri, int charOffset);
|
| +const BoundFastaCode codeInvalidVoid = const BoundFastaCode("InvalidVoid",
|
| + template:
|
| + r"""Type 'void' can't be used here because it isn't a return type.""",
|
| + tip:
|
| + r"""Try removing 'void' keyword or replace it with 'var', 'final', or a type.""",
|
| + dart2jsCode: "VOID_NOT_ALLOWED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatExpectedBody(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeExpectedBody,
|
| - message: "Expected a function body or '=>'.",
|
| - tip: "Try adding {}.",
|
| - arguments: {});
|
| -}
|
| +const UnboundFastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType =
|
| + const UnboundFastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType",
|
| + template: r"""Can't use '#lexeme' as a type.""",
|
| + analyzerCode: "EXPECTED_TYPE_NAME",
|
| + dart2jsCode: "EXTRANEOUS_MODIFIER",
|
| + bind: _bindBuiltInIdentifierAsType);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_TypeRequired> codeTypeRequired =
|
| - const FastaCode<_TypeRequired>("TypeRequired",
|
| - template: r"A type or modifier is required here.",
|
| - tip: r"Try adding a type, 'var', 'const', or 'final'.",
|
| - format: _formatTypeRequired);
|
| -
|
| -typedef FastaMessage _TypeRequired(Uri uri, int charOffset);
|
| +typedef _BuiltInIdentifierAsType = FastaMessage Function(Uri, int) Function(
|
| + Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatTypeRequired(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeTypeRequired,
|
| - message: "A type or modifier is required here.",
|
| - tip: "Try adding a type, 'var', 'const', or 'final'.",
|
| - arguments: {});
|
| +FastaMessage Function(Uri, int) _bindBuiltInIdentifierAsType(Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeBuiltInIdentifierAsType,
|
| + message: """Can't use '$lexeme' as a type.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_InvalidVoid> codeInvalidVoid = const FastaCode<_InvalidVoid>(
|
| - "InvalidVoid",
|
| - template: r"Type 'void' can't be used here because it isn't a return type.",
|
| - tip:
|
| - r"Try removing 'void' keyword or replace it with 'var', 'final', or a type.",
|
| - dart2jsCode: "VOID_NOT_ALLOWED",
|
| - format: _formatInvalidVoid);
|
| -
|
| -typedef FastaMessage _InvalidVoid(Uri uri, int charOffset);
|
| +const BoundFastaCode codeGeneratorReturnsValue = const BoundFastaCode(
|
| + "GeneratorReturnsValue",
|
| + template: r"""'sync*' and 'async*' can't return a value.""",
|
| + dart2jsCode: "FASTA_IGNORED");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatInvalidVoid(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeInvalidVoid,
|
| - message: "Type 'void' can't be used here because it isn't a return type.",
|
| - tip:
|
| - "Try removing 'void' keyword or replace it with 'var', 'final', or a type.",
|
| - arguments: {});
|
| -}
|
| +const BoundFastaCode codeListLiteralTypeArgumentMismatch = const BoundFastaCode(
|
| + "ListLiteralTypeArgumentMismatch",
|
| + template: r"""Map literal requires two type arguments.""");
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType =
|
| - const FastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType",
|
| - template: r"Can't use '#lexeme' as a type.",
|
| - analyzerCode: "EXPECTED_TYPE_NAME",
|
| - dart2jsCode: "EXTRANEOUS_MODIFIER",
|
| - format: _formatBuiltInIdentifierAsType);
|
| +const UnboundFastaCode<_MethodNotFound> codeMethodNotFound =
|
| + const UnboundFastaCode<_MethodNotFound>("MethodNotFound",
|
| + template: r"""Method not found: '#name'.""", bind: _bindMethodNotFound);
|
|
|
| -typedef FastaMessage _BuiltInIdentifierAsType(
|
| - Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _MethodNotFound = FastaMessage Function(Uri, int) Function(String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatBuiltInIdentifierAsType(
|
| - Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeBuiltInIdentifierAsType,
|
| - message: "Can't use '$lexeme' as a type.", arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindMethodNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeMethodNotFound,
|
| + message: """Method not found: '$name'.""", arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_GeneratorReturnsValue> codeGeneratorReturnsValue =
|
| - const FastaCode<_GeneratorReturnsValue>("GeneratorReturnsValue",
|
| - template: r"'sync*' and 'async*' can't return a value.",
|
| - dart2jsCode: "FASTA_IGNORED",
|
| - format: _formatGeneratorReturnsValue);
|
| +const UnboundFastaCode<_BuiltInIdentifierInDeclaration>
|
| + codeBuiltInIdentifierInDeclaration =
|
| + const UnboundFastaCode<_BuiltInIdentifierInDeclaration>(
|
| + "BuiltInIdentifierInDeclaration",
|
| + template: r"""Can't use '#lexeme' as a name here.""",
|
| + dart2jsCode: "GENERIC",
|
| + bind: _bindBuiltInIdentifierInDeclaration);
|
|
|
| -typedef FastaMessage _GeneratorReturnsValue(Uri uri, int charOffset);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _BuiltInIdentifierInDeclaration = FastaMessage Function(Uri, int)
|
| + Function(Token token);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatGeneratorReturnsValue(Uri uri, int charOffset) {
|
| - return new FastaMessage(uri, charOffset, codeGeneratorReturnsValue,
|
| - message: "'sync*' and 'async*' can't return a value.", arguments: {});
|
| +FastaMessage Function(Uri, int) _bindBuiltInIdentifierInDeclaration(
|
| + Token token) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String lexeme = token.lexeme;
|
| + return new FastaMessage(uri, charOffset, codeBuiltInIdentifierInDeclaration,
|
| + message: """Can't use '$lexeme' as a name here.""",
|
| + arguments: {'token': token});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_BuiltInIdentifierInDeclaration>
|
| - codeBuiltInIdentifierInDeclaration =
|
| - const FastaCode<_BuiltInIdentifierInDeclaration>(
|
| - "BuiltInIdentifierInDeclaration",
|
| - template: r"Can't use '#lexeme' as a name here.",
|
| - dart2jsCode: "GENERIC",
|
| - format: _formatBuiltInIdentifierInDeclaration);
|
| +const UnboundFastaCode<_RedirectionTargetNotFound>
|
| + codeRedirectionTargetNotFound =
|
| + const UnboundFastaCode<_RedirectionTargetNotFound>(
|
| + "RedirectionTargetNotFound",
|
| + template: r"""Redirection constructor target not found: '#name'""",
|
| + bind: _bindRedirectionTargetNotFound);
|
|
|
| -typedef FastaMessage _BuiltInIdentifierInDeclaration(
|
| - Uri uri, int charOffset, Token token);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _RedirectionTargetNotFound = FastaMessage Function(Uri, int) Function(
|
| + String name);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatBuiltInIdentifierInDeclaration(
|
| - Uri uri, int charOffset, Token token) {
|
| - String lexeme = token.lexeme;
|
| - return new FastaMessage(uri, charOffset, codeBuiltInIdentifierInDeclaration,
|
| - message: "Can't use '$lexeme' as a name here.",
|
| - arguments: {'token': token});
|
| +FastaMessage Function(Uri, int) _bindRedirectionTargetNotFound(String name) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + return new FastaMessage(uri, charOffset, codeRedirectionTargetNotFound,
|
| + message: """Redirection constructor target not found: '$name'""",
|
| + arguments: {'name': name});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -const FastaCode<_NonAsciiIdentifier> codeNonAsciiIdentifier = const FastaCode<
|
| +const UnboundFastaCode<
|
| + _NonAsciiIdentifier> codeNonAsciiIdentifier = const UnboundFastaCode<
|
| _NonAsciiIdentifier>("NonAsciiIdentifier",
|
| template:
|
| - r"The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments.",
|
| + r"""The non-ASCII character '#character' (#unicode) can't be used in identifiers, only in strings and comments.""",
|
| tip:
|
| - r"Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).",
|
| + r"""Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a dollar sign).""",
|
| analyzerCode: "ILLEGAL_CHARACTER",
|
| dart2jsCode: "BAD_INPUT_CHARACTER",
|
| - format: _formatNonAsciiIdentifier);
|
| + bind: _bindNonAsciiIdentifier);
|
|
|
| -typedef FastaMessage _NonAsciiIdentifier(
|
| - Uri uri, int charOffset, String character, int codePoint);
|
| +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| +typedef _NonAsciiIdentifier = FastaMessage Function(Uri, int) Function(
|
| + String character, int codePoint);
|
|
|
| // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
|
| -FastaMessage _formatNonAsciiIdentifier(
|
| - Uri uri, int charOffset, String character, int codePoint) {
|
| - String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| - return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier,
|
| - message:
|
| - "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});
|
| +FastaMessage Function(Uri, int) _bindNonAsciiIdentifier(
|
| + String character, int codePoint) {
|
| + FastaMessage bind(Uri uri, int charOffset) {
|
| + String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
|
| + return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier,
|
| + message:
|
| + """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});
|
| + }
|
| +
|
| + return bind;
|
| }
|
|
|