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

Side by Side Diff: pkg/dartino_compiler/lib/src/diagnostic.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
OLDNEW
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library fletchc.diagnostic; 5 library dartino_compiler.diagnostic;
6 6
7 import 'messages.dart' show 7 import 'messages.dart' show
8 DiagnosticKind, 8 DiagnosticKind,
9 getMessage; 9 getMessage;
10 10
11 import 'hub/sentence_parser.dart' show 11 import 'hub/sentence_parser.dart' show
12 Preposition, 12 Preposition,
13 Target, 13 Target,
14 TargetKind, 14 TargetKind,
15 Verb; 15 Verb;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 Diagnostic asDiagnostic() { 181 Diagnostic asDiagnostic() {
182 return new Diagnostic(kind, getMessage(kind), arguments); 182 return new Diagnostic(kind, getMessage(kind), arguments);
183 } 183 }
184 184
185 String toString() => 'InputError($kind, $arguments)'; 185 String toString() => 'InputError($kind, $arguments)';
186 } 186 }
187 187
188 /// Throw an internal error that will be recorded as a compiler crash. 188 /// Throw an internal error that will be recorded as a compiler crash.
189 /// 189 ///
190 /// In general, assume, no matter how unlikely, that [message] may be read by a 190 /// In general, assume, no matter how unlikely, that [message] may be read by a
191 /// user (that is, a developer using Fletch). For this reason, try to: 191 /// user (that is, a developer using Dartino). For this reason, try to:
192 /// 192 ///
193 /// * Avoid phrases that can be interpreted as blaming the user (all error 193 /// * Avoid phrases that can be interpreted as blaming the user (all error
194 /// messages should state what is wrong, in a way that doesn't assign blame). 194 /// messages should state what is wrong, in a way that doesn't assign blame).
195 /// 195 ///
196 /// * Avoid being cute or funny (there's nothing more frustrating than being 196 /// * Avoid being cute or funny (there's nothing more frustrating than being
197 /// affected by a bug and see a cute or funny message, especially if it 197 /// affected by a bug and see a cute or funny message, especially if it
198 /// happens a lot). 198 /// happens a lot).
199 /// 199 ///
200 /// * Avoid phrases like "unreachable", "can't happen", "shouldn't happen", 200 /// * Avoid phrases like "unreachable", "can't happen", "shouldn't happen",
201 /// "shouldn't be called", simply because it is wrong: it did happen. In most 201 /// "shouldn't be called", simply because it is wrong: it did happen. In most
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 arguments[DiagnosticParameter.uri] = uri; 251 arguments[DiagnosticParameter.uri] = uri;
252 } 252 }
253 if (requiredTarget != null) { 253 if (requiredTarget != null) {
254 arguments[DiagnosticParameter.requiredTarget] = requiredTarget; 254 arguments[DiagnosticParameter.requiredTarget] = requiredTarget;
255 } 255 }
256 if (fixit != null) { 256 if (fixit != null) {
257 arguments[DiagnosticParameter.fixit] = fixit; 257 arguments[DiagnosticParameter.fixit] = fixit;
258 } 258 }
259 throw new InputError(kind, arguments); 259 throw new InputError(kind, arguments);
260 } 260 }
OLDNEW
« no previous file with comments | « pkg/dartino_compiler/lib/src/device_type.dart ('k') | pkg/dartino_compiler/lib/src/dynamic_call_enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698