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

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

Issue 2455073003: Compute NativeBehavior for foreign functions. (Closed)
Patch Set: Updated cf. comment. Created 4 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * The messages in this file should meet the following guide lines: 6 * The messages in this file should meet the following guide lines:
7 * 7 *
8 * 1. The message should be a complete sentence starting with an uppercase 8 * 1. The message should be a complete sentence starting with an uppercase
9 * letter, and ending with a period. 9 * letter, and ending with a period.
10 * 10 *
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 UNTERMINATED_STRING, 456 UNTERMINATED_STRING,
457 UNTERMINATED_TOKEN, 457 UNTERMINATED_TOKEN,
458 UNUSED_CLASS, 458 UNUSED_CLASS,
459 UNUSED_LABEL, 459 UNUSED_LABEL,
460 UNUSED_METHOD, 460 UNUSED_METHOD,
461 UNUSED_TYPEDEF, 461 UNUSED_TYPEDEF,
462 VAR_FUNCTION_TYPE_PARAMETER, 462 VAR_FUNCTION_TYPE_PARAMETER,
463 VOID_EXPRESSION, 463 VOID_EXPRESSION,
464 VOID_NOT_ALLOWED, 464 VOID_NOT_ALLOWED,
465 VOID_VARIABLE, 465 VOID_VARIABLE,
466 WRONG_ARGUMENT_FOR_JS,
467 WRONG_ARGUMENT_FOR_JS_FIRST,
468 WRONG_ARGUMENT_FOR_JS_SECOND,
466 WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT, 469 WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
467 WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT, 470 WRONG_NUMBER_OF_ARGUMENTS_FOR_ASSERT,
468 YIELDING_MODIFIER_ON_ARROW_BODY, 471 YIELDING_MODIFIER_ON_ARROW_BODY,
469 } 472 }
470 473
471 /// A message template for an error, warning, hint or info message generated 474 /// A message template for an error, warning, hint or info message generated
472 /// by the compiler. Each template is associated with a [MessageKind] that 475 /// by the compiler. Each template is associated with a [MessageKind] that
473 /// uniquely identifies the message template. 476 /// uniquely identifies the message template.
474 // TODO(johnnniwinther): For Infos, consider adding a reference to the 477 // TODO(johnnniwinther): For Infos, consider adding a reference to the
475 // error/warning/hint that they belong to. 478 // error/warning/hint that they belong to.
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 howToFix: "Try adding '@MirrorsUsed(...)' as described at " 2691 howToFix: "Try adding '@MirrorsUsed(...)' as described at "
2689 "https://goo.gl/Akrrog."), 2692 "https://goo.gl/Akrrog."),
2690 2693
2691 MessageKind.JS_PLACEHOLDER_CAPTURE: const MessageTemplate( 2694 MessageKind.JS_PLACEHOLDER_CAPTURE: const MessageTemplate(
2692 MessageKind.JS_PLACEHOLDER_CAPTURE, 2695 MessageKind.JS_PLACEHOLDER_CAPTURE,
2693 "JS code must not use '#' placeholders inside functions.", 2696 "JS code must not use '#' placeholders inside functions.",
2694 howToFix: 2697 howToFix:
2695 "Use an immediately called JavaScript function to capture the" 2698 "Use an immediately called JavaScript function to capture the"
2696 " the placeholder values as JavaScript function parameters."), 2699 " the placeholder values as JavaScript function parameters."),
2697 2700
2701 MessageKind.WRONG_ARGUMENT_FOR_JS: const MessageTemplate(
2702 MessageKind.WRONG_ARGUMENT_FOR_JS,
2703 "JS expression must take two or more arguments."),
2704
2705 MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST: const MessageTemplate(
2706 MessageKind.WRONG_ARGUMENT_FOR_JS_FIRST,
2707 "JS expression must take two or more arguments."),
2708
2709 MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND: const MessageTemplate(
2710 MessageKind.WRONG_ARGUMENT_FOR_JS_SECOND,
2711 "JS second argument must be a string literal."),
2712
2698 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT: 2713 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT:
2699 const MessageTemplate( 2714 const MessageTemplate(
2700 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT, 2715 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
2701 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant.") , 2716 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant.") ,
2702 2717
2703 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD: const MessageTemplate( 2718 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD: const MessageTemplate(
2704 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, 2719 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
2705 "'#{keyword}' is a reserved word and can't be used here.", 2720 "'#{keyword}' is a reserved word and can't be used here.",
2706 howToFix: "Try using a different name.", 2721 howToFix: "Try using a different name.",
2707 examples: const ["do() {} main() {}"]), 2722 examples: const ["do() {} main() {}"]),
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3814 static String convertToString(value) { 3829 static String convertToString(value) {
3815 if (value is ErrorToken) { 3830 if (value is ErrorToken) {
3816 // Shouldn't happen. 3831 // Shouldn't happen.
3817 return value.assertionMessage; 3832 return value.assertionMessage;
3818 } else if (value is Token) { 3833 } else if (value is Token) {
3819 value = value.value; 3834 value = value.value;
3820 } 3835 }
3821 return '$value'; 3836 return '$value';
3822 } 3837 }
3823 } 3838 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698