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

Side by Side Diff: dart/lib/compiler/implementation/warnings.dart

Issue 10831332: Support new getter syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
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 class MessageKind { 5 class MessageKind {
6 final String template; 6 final String template;
7 const MessageKind(this.template); 7 const MessageKind(this.template);
8 8
9 static final GENERIC = const MessageKind('#{1}'); 9 static final GENERIC = const MessageKind('#{1}');
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( 206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind(
207 "Info: this is the method that cannot be overridden by a field."); 207 "Info: this is the method that cannot be overridden by a field.");
208 208
209 static final BAD_ARITY_OVERRIDE = const MessageKind( 209 static final BAD_ARITY_OVERRIDE = const MessageKind(
210 "Error: cannot override method '#{1}' in '#{2}'; " 210 "Error: cannot override method '#{1}' in '#{2}'; "
211 "the parameters do not match."); 211 "the parameters do not match.");
212 212
213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( 213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind(
214 "Info: this is the method whose parameters do not match."); 214 "Info: this is the method whose parameters do not match.");
215 215
216 static final MISSING_FORMALS = const MessageKind(
217 "Error: Formal parameters are missing.");
218
219 static final EXTRA_FORMALS = const MessageKind(
220 "Error: Formal parameters not allowed here.");
221
216 static final COMPILER_CRASHED = const MessageKind( 222 static final COMPILER_CRASHED = const MessageKind(
217 "Error: The compiler crashed when compiling this element."); 223 "Error: The compiler crashed when compiling this element.");
218 224
219 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' 225 static final PLEASE_REPORT_THE_CRASH = const MessageKind('''
220 The compiler is broken. 226 The compiler is broken.
221 227
222 When compiling the above element, the compiler crashed. It is not 228 When compiling the above element, the compiler crashed. It is not
223 possible to tell if this is caused by a problem in your program or 229 possible to tell if this is caused by a problem in your program or
224 not. Regardless, the compiler should not crash. 230 not. Regardless, the compiler should not crash.
225 231
226 The Dart team would greatly appreciate if you would take a moment to 232 The Dart team would greatly appreciate if you would take a moment to
227 report this problem at http://dartbug.com/new. 233 report this problem at http://dartbug.com/new.
228 234
229 Please include the following information: 235 Please include the following information:
230 236
231 * the name and version of your operating system, 237 * the name and version of your operating system,
232 238
233 * the Dart SDK build number (#{1}), and 239 * the Dart SDK build number (#{1}), and
234 240
235 * the stack trace you see here. 241 * the stack trace you see here.
236 '''); 242 ''');
237 243
238 toString() => template; 244 toString() => template;
239 245
240 Message message([List<Type> arguments = const <Type>[]]) { 246 Message message([List arguments = const []]) {
241 return new Message(this, arguments); 247 return new Message(this, arguments);
242 } 248 }
243 249
244 CompilationError error([List<Type> arguments = const <Type>[]]) { 250 CompilationError error([List arguments = const []]) {
245 return new CompilationError(this, arguments); 251 return new CompilationError(this, arguments);
246 } 252 }
247 } 253 }
248 254
249 class Message { 255 class Message {
250 final kind; 256 final kind;
251 final List arguments; 257 final List arguments;
252 String message; 258 String message;
253 259
254 Message(this.kind, this.arguments); 260 Message(this.kind, this.arguments);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 309
304 class CompileTimeConstantError extends Diagnostic { 310 class CompileTimeConstantError extends Diagnostic {
305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 311 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
306 : super(kind, arguments); 312 : super(kind, arguments);
307 } 313 }
308 314
309 class CompilationError extends Diagnostic { 315 class CompilationError extends Diagnostic {
310 CompilationError(MessageKind kind, List<Type> arguments) 316 CompilationError(MessageKind kind, List<Type> arguments)
311 : super(kind, arguments); 317 : super(kind, arguments);
312 } 318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698