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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 131233009: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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) 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.error; 8 library engine.error;
9 9
10 import 'java_core.dart'; 10 import 'java_core.dart';
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 _errorReported = true; 136 _errorReported = true;
137 } 137 }
138 } 138 }
139 139
140 /** 140 /**
141 * The enumeration `AngularCode` defines Angular specific problems. 141 * The enumeration `AngularCode` defines Angular specific problems.
142 */ 142 */
143 class AngularCode extends Enum<AngularCode> implements ErrorCode { 143 class AngularCode extends Enum<AngularCode> implements ErrorCode {
144 static final AngularCode CANNOT_PARSE_SELECTOR = new AngularCode.con1('CANNOT_ PARSE_SELECTOR', 0, "The selector '%s' cannot be parsed"); 144 static final AngularCode CANNOT_PARSE_SELECTOR = new AngularCode.con1('CANNOT_ PARSE_SELECTOR', 0, "The selector '%s' cannot be parsed");
145 145
146 static final AngularCode INVALID_PROPERTY_KIND = new AngularCode.con1('INVALID _PROPERTY_KIND', 1, "Unknown property binding kind '%s', use one of the '@', '=> ', '=>!' or '<=>'"); 146 static final AngularCode INVALID_PROPERTY_KIND = new AngularCode.con2('INVALID _PROPERTY_KIND', 1, "Unknown property binding kind '%s', use one of the '@', '=> ', '=>!' or '<=>'", ErrorSeverity.ERROR);
147 147
148 static final AngularCode INVALID_PROPERTY_FIELD = new AngularCode.con1('INVALI D_PROPERTY_FIELD', 2, "Unknown property field '%s'"); 148 static final AngularCode INVALID_PROPERTY_FIELD = new AngularCode.con1('INVALI D_PROPERTY_FIELD', 2, "Unknown property field '%s'");
149 149
150 static final AngularCode INVALID_PROPERTY_MAP = new AngularCode.con1('INVALID_ PROPERTY_MAP', 3, "Argument 'map' must be a constant map literal"); 150 static final AngularCode INVALID_PROPERTY_MAP = new AngularCode.con1('INVALID_ PROPERTY_MAP', 3, "Argument 'map' must be a constant map literal");
151 151
152 static final AngularCode INVALID_PROPERTY_NAME = new AngularCode.con1('INVALID _PROPERTY_NAME', 4, "Property name must be a string literal"); 152 static final AngularCode INVALID_PROPERTY_NAME = new AngularCode.con1('INVALID _PROPERTY_NAME', 4, "Property name must be a string literal");
153 153
154 static final AngularCode INVALID_PROPERTY_SPEC = new AngularCode.con1('INVALID _PROPERTY_SPEC', 5, "Property binding specification must be a string literal"); 154 static final AngularCode INVALID_PROPERTY_SPEC = new AngularCode.con1('INVALID _PROPERTY_SPEC', 5, "Property binding specification must be a string literal");
155 155
156 static final AngularCode INVALID_REPEAT_SYNTAX = new AngularCode.con1('INVALID _REPEAT_SYNTAX', 6, "Expected statement in form '_item_ in _collection_ [tracked by _id_]'"); 156 static final AngularCode INVALID_REPEAT_SYNTAX = new AngularCode.con1('INVALID _REPEAT_SYNTAX', 6, "Expected statement in form '_item_ in _collection_ [tracked by _id_]'");
157 157
158 static final AngularCode INVALID_REPEAT_ITEM_SYNTAX = new AngularCode.con1('IN VALID_REPEAT_ITEM_SYNTAX', 7, "Item must by identifier or in '(_key_, _value_)' pair."); 158 static final AngularCode INVALID_REPEAT_ITEM_SYNTAX = new AngularCode.con1('IN VALID_REPEAT_ITEM_SYNTAX', 7, "Item must by identifier or in '(_key_, _value_)' pair.");
159 159
160 static final AngularCode INVALID_URI = new AngularCode.con1('INVALID_URI', 8, "Invalid URI syntax: '%s'"); 160 static final AngularCode INVALID_URI = new AngularCode.con2('INVALID_URI', 8, "Invalid URI syntax: '%s'", ErrorSeverity.ERROR);
161 161
162 static final AngularCode MISSING_CSS_URL = new AngularCode.con1('MISSING_CSS_U RL', 9, "Argument 'cssUrl' must be provided"); 162 static final AngularCode MISSING_FILTER_COLON = new AngularCode.con1('MISSING_ FILTER_COLON', 9, "Missing ':' before filter argument");
163 163
164 static final AngularCode MISSING_FILTER_COLON = new AngularCode.con1('MISSING_ FILTER_COLON', 10, "Missing ':' before filter argument"); 164 static final AngularCode MISSING_NAME = new AngularCode.con1('MISSING_NAME', 1 0, "Argument 'name' must be provided");
165 165
166 static final AngularCode MISSING_NAME = new AngularCode.con1('MISSING_NAME', 1 1, "Argument 'name' must be provided"); 166 static final AngularCode MISSING_PUBLISH_AS = new AngularCode.con1('MISSING_PU BLISH_AS', 11, "Argument 'publishAs' must be provided");
167 167
168 static final AngularCode MISSING_PUBLISH_AS = new AngularCode.con1('MISSING_PU BLISH_AS', 12, "Argument 'publishAs' must be provided"); 168 static final AngularCode MISSING_SELECTOR = new AngularCode.con1('MISSING_SELE CTOR', 12, "Argument 'selector' must be provided");
169 169
170 static final AngularCode MISSING_TEMPLATE_URL = new AngularCode.con1('MISSING_ TEMPLATE_URL', 13, "Argument 'templateUrl' must be provided"); 170 static final AngularCode URI_DOES_NOT_EXIST = new AngularCode.con1('URI_DOES_N OT_EXIST', 13, "Target of URI does not exist: '%s'");
171
172 static final AngularCode MISSING_SELECTOR = new AngularCode.con1('MISSING_SELE CTOR', 14, "Argument 'selector' must be provided");
173
174 static final AngularCode URI_DOES_NOT_EXIST = new AngularCode.con1('URI_DOES_N OT_EXIST', 15, "Target of URI does not exist: '%s'");
175 171
176 static final List<AngularCode> values = [ 172 static final List<AngularCode> values = [
177 CANNOT_PARSE_SELECTOR, 173 CANNOT_PARSE_SELECTOR,
178 INVALID_PROPERTY_KIND, 174 INVALID_PROPERTY_KIND,
179 INVALID_PROPERTY_FIELD, 175 INVALID_PROPERTY_FIELD,
180 INVALID_PROPERTY_MAP, 176 INVALID_PROPERTY_MAP,
181 INVALID_PROPERTY_NAME, 177 INVALID_PROPERTY_NAME,
182 INVALID_PROPERTY_SPEC, 178 INVALID_PROPERTY_SPEC,
183 INVALID_REPEAT_SYNTAX, 179 INVALID_REPEAT_SYNTAX,
184 INVALID_REPEAT_ITEM_SYNTAX, 180 INVALID_REPEAT_ITEM_SYNTAX,
185 INVALID_URI, 181 INVALID_URI,
186 MISSING_CSS_URL,
187 MISSING_FILTER_COLON, 182 MISSING_FILTER_COLON,
188 MISSING_NAME, 183 MISSING_NAME,
189 MISSING_PUBLISH_AS, 184 MISSING_PUBLISH_AS,
190 MISSING_TEMPLATE_URL,
191 MISSING_SELECTOR, 185 MISSING_SELECTOR,
192 URI_DOES_NOT_EXIST]; 186 URI_DOES_NOT_EXIST];
193 187
194 /** 188 /**
195 * The template used to create the message to be displayed for this error. 189 * The template used to create the message to be displayed for this error.
196 */ 190 */
197 String _message; 191 String _message;
198 192
199 /** 193 /**
200 * The severity of the problem. 194 * The severity of the problem.
(...skipping 13 matching lines...) Expand all
214 * @param message the message template used to create the message to be displa yed for the error 208 * @param message the message template used to create the message to be displa yed for the error
215 * @param severity the severity of the problem 209 * @param severity the severity of the problem
216 */ 210 */
217 AngularCode.con2(String name, int ordinal, String message, ErrorSeverity sever ity) : super(name, ordinal) { 211 AngularCode.con2(String name, int ordinal, String message, ErrorSeverity sever ity) : super(name, ordinal) {
218 this._message = message; 212 this._message = message;
219 this._severity = severity; 213 this._severity = severity;
220 } 214 }
221 215
222 String get correction => null; 216 String get correction => null;
223 217
224 ErrorSeverity get errorSeverity => _severity; 218 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
225 219
226 String get message => _message; 220 String get message => _message;
227 221
228 ErrorType get type => ErrorType.TOOLKIT; 222 ErrorType get type => ErrorType.ANGULAR;
229 } 223 }
230 224
231 /** 225 /**
232 * Instances of the class `ErrorReporter` wrap an error listener with utility me thods used to 226 * Instances of the class `ErrorReporter` wrap an error listener with utility me thods used to
233 * create the errors being reported. 227 * create the errors being reported.
234 * 228 *
235 * @coverage dart.engine.error 229 * @coverage dart.engine.error
236 */ 230 */
237 class ErrorReporter { 231 class ErrorReporter {
238 /** 232 /**
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 /** 743 /**
750 * Unnecessary type checks, the result is always false. 744 * Unnecessary type checks, the result is always false.
751 */ 745 */
752 static final HintCode UNNECESSARY_TYPE_CHECK_TRUE = new HintCode.con1('UNNECES SARY_TYPE_CHECK_TRUE', 21, "Unnecessary type check, the result is always true"); 746 static final HintCode UNNECESSARY_TYPE_CHECK_TRUE = new HintCode.con1('UNNECES SARY_TYPE_CHECK_TRUE', 21, "Unnecessary type check, the result is always true");
753 747
754 /** 748 /**
755 * Unused imports are imports which are never not used. 749 * Unused imports are imports which are never not used.
756 */ 750 */
757 static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 22, " Unused import"); 751 static final HintCode UNUSED_IMPORT = new HintCode.con1('UNUSED_IMPORT', 22, " Unused import");
758 752
753 /**
754 * Hint for cases where the source expects a method or function to return a no n-void result, but
755 * the method or function signature returns void.
756 *
757 * @param name the name of the method or function that returns void
758 */
759 static final HintCode USE_OF_VOID_RESULT = new HintCode.con1('USE_OF_VOID_RESU LT', 23, "The result of '%s' is being used, even though it is declared to be 'vo id'");
760
759 static final List<HintCode> values = [ 761 static final List<HintCode> values = [
760 DEAD_CODE, 762 DEAD_CODE,
761 DEAD_CODE_CATCH_FOLLOWING_CATCH, 763 DEAD_CODE_CATCH_FOLLOWING_CATCH,
762 DEAD_CODE_ON_CATCH_SUBTYPE, 764 DEAD_CODE_ON_CATCH_SUBTYPE,
763 DEPRECATED_MEMBER_USE, 765 DEPRECATED_MEMBER_USE,
764 DUPLICATE_IMPORT, 766 DUPLICATE_IMPORT,
765 DIVISION_OPTIMIZATION, 767 DIVISION_OPTIMIZATION,
766 IS_DOUBLE, 768 IS_DOUBLE,
767 IS_INT, 769 IS_INT,
768 IS_NOT_DOUBLE, 770 IS_NOT_DOUBLE,
769 IS_NOT_INT, 771 IS_NOT_INT,
770 MISSING_RETURN, 772 MISSING_RETURN,
771 OVERRIDDING_PRIVATE_MEMBER, 773 OVERRIDDING_PRIVATE_MEMBER,
772 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, 774 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE,
773 TYPE_CHECK_IS_NOT_NULL, 775 TYPE_CHECK_IS_NOT_NULL,
774 TYPE_CHECK_IS_NULL, 776 TYPE_CHECK_IS_NULL,
775 UNDEFINED_GETTER, 777 UNDEFINED_GETTER,
776 UNDEFINED_METHOD, 778 UNDEFINED_METHOD,
777 UNDEFINED_OPERATOR, 779 UNDEFINED_OPERATOR,
778 UNDEFINED_SETTER, 780 UNDEFINED_SETTER,
779 UNNECESSARY_CAST, 781 UNNECESSARY_CAST,
780 UNNECESSARY_TYPE_CHECK_FALSE, 782 UNNECESSARY_TYPE_CHECK_FALSE,
781 UNNECESSARY_TYPE_CHECK_TRUE, 783 UNNECESSARY_TYPE_CHECK_TRUE,
782 UNUSED_IMPORT]; 784 UNUSED_IMPORT,
785 USE_OF_VOID_RESULT];
783 786
784 /** 787 /**
785 * The template used to create the message to be displayed for this error. 788 * The template used to create the message to be displayed for this error.
786 */ 789 */
787 final String message; 790 final String message;
788 791
789 /** 792 /**
790 * The template used to create the correction to be displayed for this error, or `null` if 793 * The template used to create the correction to be displayed for this error, or `null` if
791 * there is no correction information for this error. 794 * there is no correction information for this error.
792 */ 795 */
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 * warnings. 902 * warnings.
900 */ 903 */
901 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN G', 5, ErrorSeverity.WARNING); 904 static final ErrorType STATIC_TYPE_WARNING = new ErrorType('STATIC_TYPE_WARNIN G', 5, ErrorSeverity.WARNING);
902 905
903 /** 906 /**
904 * Syntactic errors are errors produced as a result of input that does not con form to the grammar. 907 * Syntactic errors are errors produced as a result of input that does not con form to the grammar.
905 */ 908 */
906 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 6, E rrorSeverity.ERROR); 909 static final ErrorType SYNTACTIC_ERROR = new ErrorType('SYNTACTIC_ERROR', 6, E rrorSeverity.ERROR);
907 910
908 /** 911 /**
909 * Toolkit specific semantic problems. 912 * Angular specific semantic problems.
910 */ 913 */
911 static final ErrorType TOOLKIT = new ErrorType('TOOLKIT', 7, ErrorSeverity.INF O); 914 static final ErrorType ANGULAR = new ErrorType('ANGULAR', 7, ErrorSeverity.INF O);
912 915
913 static final List<ErrorType> values = [ 916 static final List<ErrorType> values = [
914 TODO, 917 TODO,
915 HINT, 918 HINT,
916 COMPILE_TIME_ERROR, 919 COMPILE_TIME_ERROR,
917 PUB_SUGGESTION, 920 PUB_SUGGESTION,
918 STATIC_WARNING, 921 STATIC_WARNING,
919 STATIC_TYPE_WARNING, 922 STATIC_TYPE_WARNING,
920 SYNTACTIC_ERROR, 923 SYNTACTIC_ERROR,
921 TOOLKIT]; 924 ANGULAR];
922 925
923 /** 926 /**
924 * The severity of this type of error. 927 * The severity of this type of error.
925 */ 928 */
926 final ErrorSeverity severity; 929 final ErrorSeverity severity;
927 930
928 /** 931 /**
929 * Initialize a newly created error type to have the given severity. 932 * Initialize a newly created error type to have the given severity.
930 * 933 *
931 * @param severity the severity of this type of error 934 * @param severity the severity of this type of error
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3652 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr ection) : super(name, ordinal) { 3655 StaticTypeWarningCode.con2(String name, int ordinal, this.message, String corr ection) : super(name, ordinal) {
3653 this.correction6 = correction; 3656 this.correction6 = correction;
3654 } 3657 }
3655 3658
3656 String get correction => correction6; 3659 String get correction => correction6;
3657 3660
3658 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity; 3661 ErrorSeverity get errorSeverity => ErrorType.STATIC_TYPE_WARNING.severity;
3659 3662
3660 ErrorType get type => ErrorType.STATIC_TYPE_WARNING; 3663 ErrorType get type => ErrorType.STATIC_TYPE_WARNING;
3661 } 3664 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698