OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.src.generated.error; | 5 library analyzer.src.generated.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; | 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; |
10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 */ | 2215 */ |
2216 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = | 2216 static const CompileTimeErrorCode REFERENCED_BEFORE_DECLARATION = |
2217 const CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION', | 2217 const CompileTimeErrorCode('REFERENCED_BEFORE_DECLARATION', |
2218 "Local variables cannot be referenced before they are declared"); | 2218 "Local variables cannot be referenced before they are declared"); |
2219 | 2219 |
2220 /** | 2220 /** |
2221 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form | 2221 * 12.8.1 Rethrow: It is a compile-time error if an expression of the form |
2222 * <i>rethrow;</i> is not enclosed within a on-catch clause. | 2222 * <i>rethrow;</i> is not enclosed within a on-catch clause. |
2223 */ | 2223 */ |
2224 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = | 2224 static const CompileTimeErrorCode RETHROW_OUTSIDE_CATCH = |
2225 const CompileTimeErrorCode( | 2225 shared_messages.RETHROW_OUTSIDE_CATCH; |
2226 'RETHROW_OUTSIDE_CATCH', "rethrow must be inside of a catch clause"); | |
2227 | 2226 |
2228 /** | 2227 /** |
2229 * 13.12 Return: It is a compile-time error if a return statement of the form | 2228 * 13.12 Return: It is a compile-time error if a return statement of the form |
2230 * <i>return e;</i> appears in a generative constructor. | 2229 * <i>return e;</i> appears in a generative constructor. |
2231 */ | 2230 */ |
2232 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = | 2231 static const CompileTimeErrorCode RETURN_IN_GENERATIVE_CONSTRUCTOR = |
2233 shared_messages.RETURN_IN_GENERATIVE_CONSTRUCTOR; | 2232 shared_messages.RETURN_IN_GENERATIVE_CONSTRUCTOR; |
2234 | 2233 |
2235 /** | 2234 /** |
2236 * 13.12 Return: It is a compile-time error if a return statement of the form | 2235 * 13.12 Return: It is a compile-time error if a return statement of the form |
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5691 * Initialize a newly created error code to have the given [name]. | 5690 * Initialize a newly created error code to have the given [name]. |
5692 */ | 5691 */ |
5693 const TodoCode(String name) : super(name, "{0}"); | 5692 const TodoCode(String name) : super(name, "{0}"); |
5694 | 5693 |
5695 @override | 5694 @override |
5696 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5695 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
5697 | 5696 |
5698 @override | 5697 @override |
5699 ErrorType get type => ErrorType.TODO; | 5698 ErrorType get type => ErrorType.TODO; |
5700 } | 5699 } |
OLD | NEW |