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

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

Issue 1436263002: dart2js: Forbid # placeholders in JS function bodies. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | pkg/compiler/lib/src/native/js.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 /** 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 INVALID_SYMBOL, 274 INVALID_SYMBOL,
275 INVALID_SYNC_MODIFIER, 275 INVALID_SYNC_MODIFIER,
276 INVALID_TYPE_VARIABLE_BOUND, 276 INVALID_TYPE_VARIABLE_BOUND,
277 INVALID_UNNAMED_CONSTRUCTOR_NAME, 277 INVALID_UNNAMED_CONSTRUCTOR_NAME,
278 INVALID_URI, 278 INVALID_URI,
279 INVALID_USE_OF_SUPER, 279 INVALID_USE_OF_SUPER,
280 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, 280 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
281 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, 281 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
282 JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS, 282 JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS,
283 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS, 283 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
284 JS_PLACEHOLDER_CAPTURE,
284 LIBRARY_NAME_MISMATCH, 285 LIBRARY_NAME_MISMATCH,
285 LIBRARY_NOT_FOUND, 286 LIBRARY_NOT_FOUND,
286 LIBRARY_NOT_SUPPORTED, 287 LIBRARY_NOT_SUPPORTED,
287 LIBRARY_TAG_MUST_BE_FIRST, 288 LIBRARY_TAG_MUST_BE_FIRST,
288 MAIN_NOT_A_FUNCTION, 289 MAIN_NOT_A_FUNCTION,
289 MAIN_WITH_EXTRA_PARAMETER, 290 MAIN_WITH_EXTRA_PARAMETER,
290 MALFORMED_STRING_LITERAL, 291 MALFORMED_STRING_LITERAL,
291 MEMBER_NOT_FOUND, 292 MEMBER_NOT_FOUND,
292 MEMBER_NOT_STATIC, 293 MEMBER_NOT_STATIC,
293 MEMBER_USES_CLASS_NAME, 294 MEMBER_USES_CLASS_NAME,
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 "Import of 'dart:mirrors'."), 2562 "Import of 'dart:mirrors'."),
2562 2563
2563 MessageKind.MIRROR_IMPORT_NO_USAGE: 2564 MessageKind.MIRROR_IMPORT_NO_USAGE:
2564 const MessageTemplate(MessageKind.MIRROR_IMPORT_NO_USAGE, 2565 const MessageTemplate(MessageKind.MIRROR_IMPORT_NO_USAGE,
2565 "This import is not annotated with @MirrorsUsed, which may lead to " 2566 "This import is not annotated with @MirrorsUsed, which may lead to "
2566 "unnecessarily large generated code.", 2567 "unnecessarily large generated code.",
2567 howToFix: 2568 howToFix:
2568 "Try adding '@MirrorsUsed(...)' as described at " 2569 "Try adding '@MirrorsUsed(...)' as described at "
2569 "https://goo.gl/Akrrog."), 2570 "https://goo.gl/Akrrog."),
2570 2571
2572 MessageKind.JS_PLACEHOLDER_CAPTURE:
2573 const MessageTemplate(
2574 MessageKind.JS_PLACEHOLDER_CAPTURE,
2575 "JS code must not use '#' placeholders inside functions.",
2576 howToFix:
2577 "Use an immediately called JavaScript function to capture the"
2578 " the placeholder values as JavaScript function parameters."),
2579
2571 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT: 2580 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT:
2572 const MessageTemplate( 2581 const MessageTemplate(
2573 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT, 2582 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT,
2574 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."), 2583 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."),
2575 2584
2576 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD: 2585 MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD:
2577 const MessageTemplate(MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, 2586 const MessageTemplate(MessageKind.EXPECTED_IDENTIFIER_NOT_RESERVED_WORD,
2578 "'#{keyword}' is a reserved word and can't be used here.", 2587 "'#{keyword}' is a reserved word and can't be used here.",
2579 howToFix: "Try using a different name.", 2588 howToFix: "Try using a different name.",
2580 examples: const ["do() {} main() {}"]), 2589 examples: const ["do() {} main() {}"]),
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3619 static String convertToString(value) { 3628 static String convertToString(value) {
3620 if (value is ErrorToken) { 3629 if (value is ErrorToken) {
3621 // Shouldn't happen. 3630 // Shouldn't happen.
3622 return value.assertionMessage; 3631 return value.assertionMessage;
3623 } else if (value is Token) { 3632 } else if (value is Token) {
3624 value = value.value; 3633 value = value.value;
3625 } 3634 }
3626 return '$value'; 3635 return '$value';
3627 } 3636 }
3628 } 3637 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/native/js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698