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

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

Issue 1315483006: Split scannerlib.dart into several libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update try tests Created 5 years, 3 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 'invariant.dart' show 66 import 'invariant.dart' show
67 invariant; 67 invariant;
68 import 'spannable.dart' show 68 import 'spannable.dart' show
69 CURRENT_ELEMENT_SPANNABLE; 69 CURRENT_ELEMENT_SPANNABLE;
70 import '../scanner/scannerlib.dart'; 70 import '../scanner/token.dart' show
71 ErrorToken,
72 Token;
71 73
72 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 74 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
73 75
74 /// Keys for the [MessageTemplate]s. 76 /// Keys for the [MessageTemplate]s.
75 enum MessageKind { 77 enum MessageKind {
76 ABSTRACT_CLASS_INSTANTIATION, 78 ABSTRACT_CLASS_INSTANTIATION,
77 ABSTRACT_GETTER, 79 ABSTRACT_GETTER,
78 ABSTRACT_METHOD, 80 ABSTRACT_METHOD,
79 ABSTRACT_SETTER, 81 ABSTRACT_SETTER,
80 ACCESSED_IN_CLOSURE, 82 ACCESSED_IN_CLOSURE,
(...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 static String convertToString(value) { 3356 static String convertToString(value) {
3355 if (value is ErrorToken) { 3357 if (value is ErrorToken) {
3356 // Shouldn't happen. 3358 // Shouldn't happen.
3357 return value.assertionMessage; 3359 return value.assertionMessage;
3358 } else if (value is Token) { 3360 } else if (value is Token) {
3359 value = value.value; 3361 value = value.value;
3360 } 3362 }
3361 return '$value'; 3363 return '$value';
3362 } 3364 }
3363 } 3365 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/dart_backend.dart ('k') | pkg/compiler/lib/src/diagnostics/source_span.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698