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

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

Issue 1284673003: Move dart2jslib parts into separate libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try. Created 5 years, 4 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * 58 *
59 * Generally, we want to provide messages that consists of three sentences: 59 * Generally, we want to provide messages that consists of three sentences:
60 * 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we 60 * 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we
61 * combine the first two in [template] and the last in [howToFix]. 61 * combine the first two in [template] and the last in [howToFix].
62 */ 62 */
63 63
64 library dart2js.messages; 64 library dart2js.messages;
65 65
66 import 'dart2jslib.dart'; 66 import 'dart2jslib.dart';
67 import 'scanner/scannerlib.dart'; 67 import 'scanner/scannerlib.dart';
68 import 'util/util.dart' show CURRENT_ELEMENT_SPANNABLE;
68 69
69 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 70 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
70 71
71 /// Keys for the [MessageTemplate]s. 72 /// Keys for the [MessageTemplate]s.
72 enum MessageKind { 73 enum MessageKind {
73 ABSTRACT_CLASS_INSTANTIATION, 74 ABSTRACT_CLASS_INSTANTIATION,
74 ABSTRACT_GETTER, 75 ABSTRACT_GETTER,
75 ABSTRACT_METHOD, 76 ABSTRACT_METHOD,
76 ABSTRACT_SETTER, 77 ABSTRACT_SETTER,
77 ACCESSED_IN_CLOSURE, 78 ACCESSED_IN_CLOSURE,
(...skipping 3265 matching lines...) Expand 10 before | Expand all | Expand 10 after
3343 static String convertToString(value) { 3344 static String convertToString(value) {
3344 if (value is ErrorToken) { 3345 if (value is ErrorToken) {
3345 // Shouldn't happen. 3346 // Shouldn't happen.
3346 return value.assertionMessage; 3347 return value.assertionMessage;
3347 } else if (value is Token) { 3348 } else if (value is Token) {
3348 value = value.value; 3349 value = value.value;
3349 } 3350 }
3350 return '$value'; 3351 return '$value';
3351 } 3352 }
3352 } 3353 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698