| 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 engine.error; | 5 library engine.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart' show AstNode; | 9 import 'ast.dart' show AstNode; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3104 : super(name, message, correction); | 3104 : super(name, message, correction); |
| 3105 | 3105 |
| 3106 @override | 3106 @override |
| 3107 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 3107 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
| 3108 | 3108 |
| 3109 @override | 3109 @override |
| 3110 ErrorType get type => ErrorType.HINT; | 3110 ErrorType get type => ErrorType.HINT; |
| 3111 } | 3111 } |
| 3112 | 3112 |
| 3113 /** | 3113 /** |
| 3114 * The error codes used for errors in HTML files. The convention for this |
| 3115 * class is for the name of the error code to indicate the problem that caused |
| 3116 * the error to be generated and for the error message to explain what is wrong |
| 3117 * and, when appropriate, how the problem can be corrected. |
| 3118 */ |
| 3119 class HtmlErrorCode extends ErrorCode { |
| 3120 /** |
| 3121 * An error code indicating that there is a syntactic error in the file. |
| 3122 * |
| 3123 * Parameters: |
| 3124 * 0: the error message from the parse error |
| 3125 */ |
| 3126 static const HtmlErrorCode PARSE_ERROR = |
| 3127 const HtmlErrorCode('PARSE_ERROR', '{0}'); |
| 3128 |
| 3129 /** |
| 3130 * Initialize a newly created error code to have the given [name]. The message |
| 3131 * associated with the error will be created from the given [message] |
| 3132 * template. The correction associated with the error will be created from the |
| 3133 * given [correction] template. |
| 3134 */ |
| 3135 const HtmlErrorCode(String name, String message, [String correction]) |
| 3136 : super(name, message, correction); |
| 3137 |
| 3138 @override |
| 3139 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; |
| 3140 |
| 3141 @override |
| 3142 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; |
| 3143 } |
| 3144 |
| 3145 /** |
| 3114 * The error codes used for warnings in HTML files. The convention for this | 3146 * The error codes used for warnings in HTML files. The convention for this |
| 3115 * class is for the name of the error code to indicate the problem that caused | 3147 * class is for the name of the error code to indicate the problem that caused |
| 3116 * the error to be generated and for the error message to explain what is wrong | 3148 * the error to be generated and for the error message to explain what is wrong |
| 3117 * and, when appropriate, how the problem can be corrected. | 3149 * and, when appropriate, how the problem can be corrected. |
| 3118 */ | 3150 */ |
| 3119 class HtmlWarningCode extends ErrorCode { | 3151 class HtmlWarningCode extends ErrorCode { |
| 3120 /** | 3152 /** |
| 3121 * An error code indicating that the value of the 'src' attribute of a Dart | 3153 * An error code indicating that the value of the 'src' attribute of a Dart |
| 3122 * script tag is not a valid URI. | 3154 * script tag is not a valid URI. |
| 3123 * | 3155 * |
| (...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4938 * Initialize a newly created error code to have the given [name]. | 4970 * Initialize a newly created error code to have the given [name]. |
| 4939 */ | 4971 */ |
| 4940 const TodoCode(String name) : super(name, "{0}"); | 4972 const TodoCode(String name) : super(name, "{0}"); |
| 4941 | 4973 |
| 4942 @override | 4974 @override |
| 4943 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4975 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 4944 | 4976 |
| 4945 @override | 4977 @override |
| 4946 ErrorType get type => ErrorType.TODO; | 4978 ErrorType get type => ErrorType.TODO; |
| 4947 } | 4979 } |
| OLD | NEW |