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

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

Issue 2675103003: Refactor BackendHelpers to be reusageable with KernelWorldBuilder (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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
« no previous file with comments | « pkg/compiler/lib/src/core_types.dart ('k') | pkg/compiler/lib/src/elements/elements.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 * 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 * or ERROR about the duplicated element, and then report an INFO about the 55 * or ERROR about the duplicated element, and then report an INFO about the
56 * location of the existing element. 56 * location of the existing element.
57 * 57 *
58 * Generally, we want to provide messages that consists of three sentences: 58 * Generally, we want to provide messages that consists of three sentences:
59 * 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we 59 * 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we
60 * combine the first two in [template] and the last in [howToFix]. 60 * combine the first two in [template] and the last in [howToFix].
61 */ 61 */
62 62
63 library dart2js.messages; 63 library dart2js.messages;
64 64
65 import 'package:front_end/src/fasta/scanner.dart' 65 import 'package:front_end/src/fasta/scanner.dart' show ErrorToken, Token;
66 show ErrorToken, Token;
67 import 'generated/shared_messages.dart' as shared_messages; 66 import 'generated/shared_messages.dart' as shared_messages;
68 import 'invariant.dart' show invariant; 67 import 'invariant.dart' show invariant;
69 import 'spannable.dart' show CURRENT_ELEMENT_SPANNABLE; 68 import 'spannable.dart' show CURRENT_ELEMENT_SPANNABLE;
70 69
71 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; 70 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
72 71
73 /// Keys for the [MessageTemplate]s. 72 /// Keys for the [MessageTemplate]s.
74 enum MessageKind { 73 enum MessageKind {
75 ABSTRACT_CLASS_INSTANTIATION, 74 ABSTRACT_CLASS_INSTANTIATION,
76 ABSTRACT_GETTER, 75 ABSTRACT_GETTER,
(...skipping 3731 matching lines...) Expand 10 before | Expand all | Expand 10 after
3808 static String convertToString(value) { 3807 static String convertToString(value) {
3809 if (value is ErrorToken) { 3808 if (value is ErrorToken) {
3810 // Shouldn't happen. 3809 // Shouldn't happen.
3811 return value.assertionMessage; 3810 return value.assertionMessage;
3812 } else if (value is Token) { 3811 } else if (value is Token) {
3813 value = value.value; 3812 value = value.value;
3814 } 3813 }
3815 return '$value'; 3814 return '$value';
3816 } 3815 }
3817 } 3816 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/core_types.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698