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

Side by Side Diff: pkg/compiler/lib/src/diagnostics/messages.dart

Issue 1716463002: More shared messages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 /** 6 /**
7 * The messages in this file should meet the following guide lines: 7 * The messages in this file should meet the following guide lines:
8 * 8 *
9 * 1. The message should be a complete sentence starting with an uppercase 9 * 1. The message should be a complete sentence starting with an uppercase
10 * letter, and ending with a period. 10 * letter, and ending with a period.
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 SWITCH_CASE_FORBIDDEN, 421 SWITCH_CASE_FORBIDDEN,
422 SWITCH_CASE_TYPES_NOT_EQUAL, 422 SWITCH_CASE_TYPES_NOT_EQUAL,
423 SWITCH_CASE_TYPES_NOT_EQUAL_CASE, 423 SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
424 SWITCH_CASE_VALUE_OVERRIDES_EQUALS, 424 SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
425 TERNARY_OPERATOR_BAD_ARITY, 425 TERNARY_OPERATOR_BAD_ARITY,
426 THIS_CALL_TO_FACTORY, 426 THIS_CALL_TO_FACTORY,
427 THIS_IS_THE_DECLARATION, 427 THIS_IS_THE_DECLARATION,
428 THIS_IS_THE_METHOD, 428 THIS_IS_THE_METHOD,
429 THIS_IS_THE_PART_OF_TAG, 429 THIS_IS_THE_PART_OF_TAG,
430 THIS_PROPERTY, 430 THIS_PROPERTY,
431 THROW_WITHOUT_EXPRESSION, 431 RETHROW_OUTSIDE_CATCH,
432 TOP_LEVEL_VARIABLE_DECLARED_STATIC, 432 TOP_LEVEL_VARIABLE_DECLARED_STATIC,
433 TYPE_ARGUMENT_COUNT_MISMATCH, 433 TYPE_ARGUMENT_COUNT_MISMATCH,
434 TYPE_VARIABLE_IN_CONSTANT, 434 TYPE_VARIABLE_IN_CONSTANT,
435 TYPE_VARIABLE_WITHIN_STATIC_MEMBER, 435 TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
436 TYPEDEF_FORMAL_WITH_DEFAULT, 436 TYPEDEF_FORMAL_WITH_DEFAULT,
437 UNARY_OPERATOR_BAD_ARITY, 437 UNARY_OPERATOR_BAD_ARITY,
438 UNBOUND_LABEL, 438 UNBOUND_LABEL,
439 UNIMPLEMENTED_EXPLICIT_GETTER, 439 UNIMPLEMENTED_EXPLICIT_GETTER,
440 UNIMPLEMENTED_EXPLICIT_SETTER, 440 UNIMPLEMENTED_EXPLICIT_SETTER,
441 UNIMPLEMENTED_GETTER, 441 UNIMPLEMENTED_GETTER,
442 UNIMPLEMENTED_GETTER_ONE, 442 UNIMPLEMENTED_GETTER_ONE,
443 UNIMPLEMENTED_IMPLICIT_GETTER, 443 UNIMPLEMENTED_IMPLICIT_GETTER,
444 UNIMPLEMENTED_IMPLICIT_SETTER, 444 UNIMPLEMENTED_IMPLICIT_SETTER,
445 UNIMPLEMENTED_METHOD, 445 UNIMPLEMENTED_METHOD,
446 UNIMPLEMENTED_METHOD_CONT, 446 UNIMPLEMENTED_METHOD_CONT,
447 UNIMPLEMENTED_METHOD_ONE, 447 UNIMPLEMENTED_METHOD_ONE,
448 UNIMPLEMENTED_SETTER, 448 UNIMPLEMENTED_SETTER,
449 UNIMPLEMENTED_SETTER_ONE, 449 UNIMPLEMENTED_SETTER_ONE,
450 UNMATCHED_TOKEN, 450 UNMATCHED_TOKEN,
451 UNRECOGNIZED_VERSION_OF_LOOKUP_MAP, 451 UNRECOGNIZED_VERSION_OF_LOOKUP_MAP,
452 UNSUPPORTED_BANG_EQ_EQ, 452 UNSUPPORTED_BANG_EQ_EQ,
453 UNSUPPORTED_EQ_EQ_EQ, 453 UNSUPPORTED_EQ_EQ_EQ,
454 UNSUPPORTED_LITERAL_SYMBOL, 454 UNSUPPORTED_LITERAL_SYMBOL,
455 UNSUPPORTED_PREFIX_PLUS, 455 UNSUPPORTED_PREFIX_PLUS,
456 UNSUPPORTED_THROW_WITHOUT_EXP, 456 MISSING_EXPRESSION_IN_THROW,
457 UNTERMINATED_COMMENT, 457 UNTERMINATED_COMMENT,
458 UNTERMINATED_STRING, 458 UNTERMINATED_STRING,
459 UNTERMINATED_TOKEN, 459 UNTERMINATED_TOKEN,
460 UNUSED_CLASS, 460 UNUSED_CLASS,
461 UNUSED_LABEL, 461 UNUSED_LABEL,
462 UNUSED_METHOD, 462 UNUSED_METHOD,
463 UNUSED_TYPEDEF, 463 UNUSED_TYPEDEF,
464 VAR_FUNCTION_TYPE_PARAMETER, 464 VAR_FUNCTION_TYPE_PARAMETER,
465 VOID_EXPRESSION, 465 VOID_EXPRESSION,
466 VOID_NOT_ALLOWED, 466 VOID_NOT_ALLOWED,
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 "Cannot use type annotations in catch."), 1142 "Cannot use type annotations in catch."),
1143 1143
1144 MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH: 1144 MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH:
1145 const MessageTemplate(MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH, 1145 const MessageTemplate(MessageKind.PARAMETER_WITH_MODIFIER_IN_CATCH,
1146 "Cannot use modifiers in catch."), 1146 "Cannot use modifiers in catch."),
1147 1147
1148 MessageKind.OPTIONAL_PARAMETER_IN_CATCH: 1148 MessageKind.OPTIONAL_PARAMETER_IN_CATCH:
1149 const MessageTemplate(MessageKind.OPTIONAL_PARAMETER_IN_CATCH, 1149 const MessageTemplate(MessageKind.OPTIONAL_PARAMETER_IN_CATCH,
1150 "Cannot use optional parameters in catch."), 1150 "Cannot use optional parameters in catch."),
1151 1151
1152 MessageKind.THROW_WITHOUT_EXPRESSION:
1153 const MessageTemplate(MessageKind.THROW_WITHOUT_EXPRESSION,
1154 "Cannot use re-throw outside of catch block "
1155 "(expression expected after 'throw')."),
1156
1157 MessageKind.UNBOUND_LABEL: 1152 MessageKind.UNBOUND_LABEL:
1158 const MessageTemplate(MessageKind.UNBOUND_LABEL, 1153 const MessageTemplate(MessageKind.UNBOUND_LABEL,
1159 "Cannot resolve label '#{labelName}'."), 1154 "Cannot resolve label '#{labelName}'."),
1160 1155
1161 MessageKind.NO_BREAK_TARGET: 1156 MessageKind.NO_BREAK_TARGET:
1162 const MessageTemplate(MessageKind.NO_BREAK_TARGET, 1157 const MessageTemplate(MessageKind.NO_BREAK_TARGET,
1163 "'break' statement not inside switch or loop."), 1158 "'break' statement not inside switch or loop."),
1164 1159
1165 MessageKind.NO_CONTINUE_TARGET: 1160 MessageKind.NO_CONTINUE_TARGET:
1166 const MessageTemplate(MessageKind.NO_CONTINUE_TARGET, 1161 const MessageTemplate(MessageKind.NO_CONTINUE_TARGET,
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 "Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?"), 2385 "Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?"),
2391 2386
2392 MessageKind.UNSUPPORTED_PREFIX_PLUS: 2387 MessageKind.UNSUPPORTED_PREFIX_PLUS:
2393 const MessageTemplate(MessageKind.UNSUPPORTED_PREFIX_PLUS, 2388 const MessageTemplate(MessageKind.UNSUPPORTED_PREFIX_PLUS,
2394 "'+' is not a prefix operator. ", 2389 "'+' is not a prefix operator. ",
2395 howToFix: "Try removing '+'.", 2390 howToFix: "Try removing '+'.",
2396 examples: const [ 2391 examples: const [
2397 "main() => +2; // No longer a valid way to write '2'" 2392 "main() => +2; // No longer a valid way to write '2'"
2398 ]), 2393 ]),
2399 2394
2400 MessageKind.UNSUPPORTED_THROW_WITHOUT_EXP:
2401 const MessageTemplate(MessageKind.UNSUPPORTED_THROW_WITHOUT_EXP,
2402 "No expression after 'throw'. "
2403 "Did you mean 'rethrow'?"),
2404
2405 MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX: 2395 MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX:
2406 const MessageTemplate(MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX, 2396 const MessageTemplate(MessageKind.DEPRECATED_TYPEDEF_MIXIN_SYNTAX,
2407 "'typedef' not allowed here. ", 2397 "'typedef' not allowed here. ",
2408 howToFix: "Try replacing 'typedef' with 'class'.", 2398 howToFix: "Try replacing 'typedef' with 'class'.",
2409 examples: const [ 2399 examples: const [
2410 """ 2400 """
2411 class B { } 2401 class B { }
2412 class M1 { } 2402 class M1 { }
2413 typedef C = B with M1; // Need to replace 'typedef' with 'class'. 2403 typedef C = B with M1; // Need to replace 'typedef' with 'class'.
2414 main() { new C(); } 2404 main() { new C(); }
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 static String convertToString(value) { 3664 static String convertToString(value) {
3675 if (value is ErrorToken) { 3665 if (value is ErrorToken) {
3676 // Shouldn't happen. 3666 // Shouldn't happen.
3677 return value.assertionMessage; 3667 return value.assertionMessage;
3678 } else if (value is Token) { 3668 } else if (value is Token) {
3679 value = value.value; 3669 value = value.value;
3680 } 3670 }
3681 return '$value'; 3671 return '$value';
3682 } 3672 }
3683 } 3673 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart ('k') | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698