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

Side by Side Diff: pkg/compiler/lib/src/warnings.dart

Issue 746993002: Avoid patching in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('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 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 "No setter found for setter patch '#{setterName}'."); 2242 "No setter found for setter patch '#{setterName}'.");
2243 2243
2244 static const MessageKind PATCH_NON_CONSTRUCTOR = const MessageKind( 2244 static const MessageKind PATCH_NON_CONSTRUCTOR = const MessageKind(
2245 "Cannot patch non-constructor with constructor patch " 2245 "Cannot patch non-constructor with constructor patch "
2246 "'#{constructorName}'."); 2246 "'#{constructorName}'.");
2247 2247
2248 static const MessageKind PATCH_NON_FUNCTION = const MessageKind( 2248 static const MessageKind PATCH_NON_FUNCTION = const MessageKind(
2249 "Cannot patch non-function with function patch " 2249 "Cannot patch non-function with function patch "
2250 "'#{functionName}'."); 2250 "'#{functionName}'.");
2251 2251
2252 static const MessageKind EXTERNAL_WITH_BODY = const MessageKind(
2253 "External function '#{functionName}' cannot have a function body.",
2254 options: const ["--output-type=dart"],
2255 howToFix: "Try removing the 'external' modifier or the function body.",
2256 examples: const ["""
2257 external foo() => 0;
2258 main() => foo();
2259 """, """
2260 external foo() {}
2261 main() => foo();
2262 """]);
2263
2252 ////////////////////////////////////////////////////////////////////////////// 2264 //////////////////////////////////////////////////////////////////////////////
2253 // Patch errors end. 2265 // Patch errors end.
2254 ////////////////////////////////////////////////////////////////////////////// 2266 //////////////////////////////////////////////////////////////////////////////
2255 2267
2256 static const String IMPORT_EXPERIMENTAL_MIRRORS_PADDING = '\n* '; 2268 static const String IMPORT_EXPERIMENTAL_MIRRORS_PADDING = '\n* ';
2257 2269
2258 static const MessageKind IMPORT_EXPERIMENTAL_MIRRORS = 2270 static const MessageKind IMPORT_EXPERIMENTAL_MIRRORS =
2259 const MessageKind(r''' 2271 const MessageKind(r'''
2260 2272
2261 **************************************************************** 2273 ****************************************************************
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 static String convertToString(value) { 2349 static String convertToString(value) {
2338 if (value is ErrorToken) { 2350 if (value is ErrorToken) {
2339 // Shouldn't happen. 2351 // Shouldn't happen.
2340 return value.assertionMessage; 2352 return value.assertionMessage;
2341 } else if (value is Token) { 2353 } else if (value is Token) {
2342 value = value.value; 2354 value = value.value;
2343 } 2355 }
2344 return '$value'; 2356 return '$value';
2345 } 2357 }
2346 } 2358 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698