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

Side by Side Diff: dart/frog/leg/warnings.dart

Issue 9309061: Implement script tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( 81 static final FIELD_PARAMETER_NOT_ALLOWED = const MessageKind(
82 'A field parameter is only allowed in generative constructors'); 82 'A field parameter is only allowed in generative constructors');
83 static final INVALID_PARAMETER = const MessageKind( 83 static final INVALID_PARAMETER = const MessageKind(
84 "Cannot resolve parameter"); 84 "Cannot resolve parameter");
85 static final NOT_INSTANCE_FIELD = const MessageKind( 85 static final NOT_INSTANCE_FIELD = const MessageKind(
86 '#{1} is not an instance field'); 86 '#{1} is not an instance field');
87 87
88 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( 88 static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
89 '#{1} cannot be used as compile-time constant'); 89 '#{1} cannot be used as compile-time constant');
90 90
91 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind(
92 '#{1} has no member named #{2}');
93
91 toString() => template; 94 toString() => template;
92 } 95 }
93 96
94 class Message { 97 class Message {
95 final kind; 98 final kind;
96 final List arguments; 99 final List arguments;
97 String message; 100 String message;
98 101
99 Message(this.kind, this.arguments); 102 Message(this.kind, this.arguments);
100 103
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 String toString() => message.toString(); 142 String toString() => message.toString();
140 } 143 }
141 144
142 class CompileTimeConstantError { 145 class CompileTimeConstantError {
143 final Message message; 146 final Message message;
144 CompileTimeConstantError.message(this.message); 147 CompileTimeConstantError.message(this.message);
145 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 148 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
146 : message = new Message(kind, arguments); 149 : message = new Message(kind, arguments);
147 String toString() => message.toString(); 150 String toString() => message.toString();
148 } 151 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698