| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.error; | 3 library engine.error; |
| 4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
| 5 import 'source.dart'; | 5 import 'source.dart'; |
| 6 import 'ast.dart' show ASTNode; | 6 import 'ast.dart' show ASTNode; |
| 7 import 'scanner.dart' show Token; | 7 import 'scanner.dart' show Token; |
| 8 /** | 8 /** |
| 9 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. | 9 * Instances of the enumeration {@code ErrorSeverity} represent the severity of
an {@link ErrorCode}. |
| 10 * @coverage dart.engine.error | 10 * @coverage dart.engine.error |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 throw new IllegalArgumentException("An error listener must be provided"); | 163 throw new IllegalArgumentException("An error listener must be provided"); |
| 164 } else if (defaultSource == null) { | 164 } else if (defaultSource == null) { |
| 165 throw new IllegalArgumentException("A default source must be provided"); | 165 throw new IllegalArgumentException("A default source must be provided"); |
| 166 } | 166 } |
| 167 this._errorListener = errorListener; | 167 this._errorListener = errorListener; |
| 168 this._defaultSource = defaultSource; | 168 this._defaultSource = defaultSource; |
| 169 this._source = defaultSource; | 169 this._source = defaultSource; |
| 170 } | 170 } |
| 171 | 171 |
| 172 /** | 172 /** |
| 173 * Creates an error with properties with the given error code and arguments. |
| 174 * @param errorCode the error code of the error to be reported |
| 175 * @param node the node specifying the location of the error |
| 176 * @param arguments the arguments to the error, used to compose the error mess
age |
| 177 */ |
| 178 AnalysisErrorWithProperties newErrorWithProperties(ErrorCode errorCode, ASTNod
e node, List<Object> arguments) => new AnalysisErrorWithProperties.con2(_source,
node.offset, node.length, errorCode, arguments); |
| 179 |
| 180 /** |
| 173 * Report a passed error. | 181 * Report a passed error. |
| 174 * @param error the error to report | 182 * @param error the error to report |
| 175 */ | 183 */ |
| 176 void reportError(AnalysisError error) { | 184 void reportError(AnalysisError error) { |
| 177 _errorListener.onError(error); | 185 _errorListener.onError(error); |
| 178 } | 186 } |
| 179 | 187 |
| 180 /** | 188 /** |
| 181 * Report an error with the given error code and arguments. | 189 * Report an error with the given error code and arguments. |
| 182 * @param errorCode the error code of the error to be reported | 190 * @param errorCode the error code of the error to be reported |
| (...skipping 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 StaticTypeWarningCode(this.name, this.ordinal, String message) { | 2571 StaticTypeWarningCode(this.name, this.ordinal, String message) { |
| 2564 this._message = message; | 2572 this._message = message; |
| 2565 } | 2573 } |
| 2566 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; | 2574 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; |
| 2567 String get message => _message; | 2575 String get message => _message; |
| 2568 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; | 2576 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; |
| 2569 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; | 2577 int compareTo(StaticTypeWarningCode other) => ordinal - other.ordinal; |
| 2570 int get hashCode => ordinal; | 2578 int get hashCode => ordinal; |
| 2571 String toString() => name; | 2579 String toString() => name; |
| 2572 } | 2580 } |
| OLD | NEW |