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

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

Issue 10917070: Disallow legacy try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.status » ('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 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 const GENERIC = const MessageKind('#{1}'); 9 static const GENERIC = const MessageKind('#{1}');
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 '#{1} is a #{2}, not a constructor'); 96 '#{1} is a #{2}, not a constructor');
97 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( 97 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind(
98 'a field parameter is only allowed in generative constructors'); 98 'a field parameter is only allowed in generative constructors');
99 static const INVALID_PARAMETER = const MessageKind( 99 static const INVALID_PARAMETER = const MessageKind(
100 "cannot resolve parameter"); 100 "cannot resolve parameter");
101 static const NOT_INSTANCE_FIELD = const MessageKind( 101 static const NOT_INSTANCE_FIELD = const MessageKind(
102 '#{1} is not an instance field'); 102 '#{1} is not an instance field');
103 static const NO_CATCH_NOR_FINALLY = const MessageKind( 103 static const NO_CATCH_NOR_FINALLY = const MessageKind(
104 "expected 'catch' or 'finally'"); 104 "expected 'catch' or 'finally'");
105 static const EMPTY_CATCH_DECLARATION = const MessageKind( 105 static const EMPTY_CATCH_DECLARATION = const MessageKind(
106 'expected a variable in catch declaration'); 106 'expected an identifier in catch declaration');
107 static const EXTRA_CATCH_DECLARATION = const MessageKind( 107 static const EXTRA_CATCH_DECLARATION = const MessageKind(
108 'extra variable in catch declaration'); 108 'extra parameter in catch declaration');
109 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind(
110 'cannot use type annotations in catch');
111 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind(
112 'cannot use modifiers in catch');
113 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind(
114 'cannot use optional parameters in catch');
109 static const UNBOUND_LABEL = const MessageKind( 115 static const UNBOUND_LABEL = const MessageKind(
110 'cannot resolve label #{1}'); 116 'cannot resolve label #{1}');
111 static const NO_BREAK_TARGET = const MessageKind( 117 static const NO_BREAK_TARGET = const MessageKind(
112 'break statement not inside switch or loop'); 118 'break statement not inside switch or loop');
113 static const NO_CONTINUE_TARGET = const MessageKind( 119 static const NO_CONTINUE_TARGET = const MessageKind(
114 'continue statement not inside loop'); 120 'continue statement not inside loop');
115 static const EXISTING_LABEL = const MessageKind( 121 static const EXISTING_LABEL = const MessageKind(
116 'original declaration of duplicate label #{1}'); 122 'original declaration of duplicate label #{1}');
117 static const DUPLICATE_LABEL = const MessageKind( 123 static const DUPLICATE_LABEL = const MessageKind(
118 'duplicate declaration of label #{1}'); 124 'duplicate declaration of label #{1}');
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 334
329 class CompileTimeConstantError extends Diagnostic { 335 class CompileTimeConstantError extends Diagnostic {
330 CompileTimeConstantError(MessageKind kind, List arguments) 336 CompileTimeConstantError(MessageKind kind, List arguments)
331 : super(kind, arguments); 337 : super(kind, arguments);
332 } 338 }
333 339
334 class CompilationError extends Diagnostic { 340 class CompilationError extends Diagnostic {
335 CompilationError(MessageKind kind, List arguments) 341 CompilationError(MessageKind kind, List arguments)
336 : super(kind, arguments); 342 : super(kind, arguments);
337 } 343 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698