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

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

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Fixes after rebase. Created 3 years, 9 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 * 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 INVALID_OVERRIDE_GETTER_WITH_FIELD, 268 INVALID_OVERRIDE_GETTER_WITH_FIELD,
269 INVALID_OVERRIDE_METHOD, 269 INVALID_OVERRIDE_METHOD,
270 INVALID_OVERRIDE_SETTER, 270 INVALID_OVERRIDE_SETTER,
271 INVALID_OVERRIDE_SETTER_WITH_FIELD, 271 INVALID_OVERRIDE_SETTER_WITH_FIELD,
272 INVALID_PACKAGE_CONFIG, 272 INVALID_PACKAGE_CONFIG,
273 INVALID_PACKAGE_URI, 273 INVALID_PACKAGE_URI,
274 INVALID_PARAMETER, 274 INVALID_PARAMETER,
275 INVALID_RECEIVER_IN_INITIALIZER, 275 INVALID_RECEIVER_IN_INITIALIZER,
276 INVALID_SOURCE_FILE_LOCATION, 276 INVALID_SOURCE_FILE_LOCATION,
277 INVALID_SYMBOL, 277 INVALID_SYMBOL,
278 INVALID_INLINE_FUNCTION_TYPE,
278 INVALID_SYNC_MODIFIER, 279 INVALID_SYNC_MODIFIER,
279 INVALID_TYPE_VARIABLE_BOUND, 280 INVALID_TYPE_VARIABLE_BOUND,
280 INVALID_UNNAMED_CONSTRUCTOR_NAME, 281 INVALID_UNNAMED_CONSTRUCTOR_NAME,
281 INVALID_URI, 282 INVALID_URI,
282 INVALID_USE_OF_SUPER, 283 INVALID_USE_OF_SUPER,
283 INVALID_YIELD, 284 INVALID_YIELD,
284 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, 285 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS,
285 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, 286 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER,
286 JS_INTEROP_INDEX_NOT_SUPPORTED, 287 JS_INTEROP_INDEX_NOT_SUPPORTED,
287 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS, 288 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS,
(...skipping 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 3313
3313 MessageKind.HIDDEN_HINTS: const MessageTemplate( 3314 MessageKind.HIDDEN_HINTS: const MessageTemplate(
3314 MessageKind.HIDDEN_HINTS, "#{hints} hint(s) suppressed in #{uri}."), 3315 MessageKind.HIDDEN_HINTS, "#{hints} hint(s) suppressed in #{uri}."),
3315 3316
3316 MessageKind.PREAMBLE: const MessageTemplate( 3317 MessageKind.PREAMBLE: const MessageTemplate(
3317 MessageKind.PREAMBLE, 3318 MessageKind.PREAMBLE,
3318 "When run on the command-line, the compiled output might" 3319 "When run on the command-line, the compiled output might"
3319 " require a preamble file located in:\n" 3320 " require a preamble file located in:\n"
3320 " <sdk>/lib/_internal/js_runtime/lib/preambles."), 3321 " <sdk>/lib/_internal/js_runtime/lib/preambles."),
3321 3322
3323 MessageKind.INVALID_INLINE_FUNCTION_TYPE: const MessageTemplate(
3324 MessageKind.INVALID_INLINE_FUNCTION_TYPE,
3325 "Invalid inline function type.",
3326 howToFix: "Try changing the inline function type (as in 'int f()') to"
3327 " a prefixed function type using the `Function` keyword (as in "
3328 "'int Function() f').",
3329 examples:
3330 const ["typedef F = Function(int f(String x)); main() { F f; }"],
3331 ),
3332
3322 MessageKind.INVALID_SYNC_MODIFIER: const MessageTemplate( 3333 MessageKind.INVALID_SYNC_MODIFIER: const MessageTemplate(
3323 MessageKind.INVALID_SYNC_MODIFIER, "Invalid modifier 'sync'.", 3334 MessageKind.INVALID_SYNC_MODIFIER, "Invalid modifier 'sync'.",
3324 howToFix: "Try replacing 'sync' with 'sync*'.", 3335 howToFix: "Try replacing 'sync' with 'sync*'.",
3325 examples: const ["main() sync {}"]), 3336 examples: const ["main() sync {}"]),
3326 3337
3327 MessageKind.INVALID_AWAIT_FOR: const MessageTemplate( 3338 MessageKind.INVALID_AWAIT_FOR: const MessageTemplate(
3328 MessageKind.INVALID_AWAIT_FOR, 3339 MessageKind.INVALID_AWAIT_FOR,
3329 "'await' is only supported on for-in loops.", 3340 "'await' is only supported on for-in loops.",
3330 howToFix: "Try rewriting the loop as a for-in loop or removing the " 3341 howToFix: "Try rewriting the loop as a for-in loop or removing the "
3331 "'await' keyword.", 3342 "'await' keyword.",
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
3807 static String convertToString(value) { 3818 static String convertToString(value) {
3808 if (value is ErrorToken) { 3819 if (value is ErrorToken) {
3809 // Shouldn't happen. 3820 // Shouldn't happen.
3810 return value.assertionMessage; 3821 return value.assertionMessage;
3811 } else if (value is Token) { 3822 } else if (value is Token) {
3812 value = value.value; 3823 value = value.value;
3813 } 3824 }
3814 return '$value'; 3825 return '$value';
3815 } 3826 }
3816 } 3827 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698