| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 'BUILD_LIBRARY_ERRORS', AnalysisError.NO_ERRORS, | 60 'BUILD_LIBRARY_ERRORS', AnalysisError.NO_ERRORS, |
| 61 contributesTo: DART_ERRORS); | 61 contributesTo: DART_ERRORS); |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * The [ClassElement]s of a [LibraryUnitTarget]. | 64 * The [ClassElement]s of a [LibraryUnitTarget]. |
| 65 */ | 65 */ |
| 66 final ListResultDescriptor<ClassElement> CLASS_ELEMENTS = | 66 final ListResultDescriptor<ClassElement> CLASS_ELEMENTS = |
| 67 new ListResultDescriptor<ClassElement>('CLASS_ELEMENTS', null); | 67 new ListResultDescriptor<ClassElement>('CLASS_ELEMENTS', null); |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * The element model associated with a single compilation unit. |
| 71 * |
| 72 * The result is only available for targets representing a Dart compilation unit
. |
| 73 */ |
| 74 final ResultDescriptor<CompilationUnitElement> COMPILATION_UNIT_ELEMENT = |
| 75 new ResultDescriptor<CompilationUnitElement>( |
| 76 'COMPILATION_UNIT_ELEMENT', null); |
| 77 |
| 78 /** |
| 70 * The [ConstructorElement]s of a [ClassElement]. | 79 * The [ConstructorElement]s of a [ClassElement]. |
| 71 */ | 80 */ |
| 72 final ResultDescriptor<List<ConstructorElement>> CONSTRUCTORS = | 81 final ResultDescriptor<List<ConstructorElement>> CONSTRUCTORS = |
| 73 new ResultDescriptor<List<ConstructorElement>>('CONSTRUCTORS', null); | 82 new ResultDescriptor<List<ConstructorElement>>('CONSTRUCTORS', null); |
| 74 | 83 |
| 75 /** | 84 /** |
| 76 * The errors produced while building a [ClassElement] constructors. | 85 * The errors produced while building a [ClassElement] constructors. |
| 77 * | 86 * |
| 78 * The list will be empty if there were no errors, but will not be `null`. | 87 * The list will be empty if there were no errors, but will not be `null`. |
| 79 * | 88 * |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 * The partial [LibraryElement] associated with a library. | 160 * The partial [LibraryElement] associated with a library. |
| 152 * | 161 * |
| 153 * Implicit constructors are built for every [ClassElement] requiring them. | 162 * Implicit constructors are built for every [ClassElement] requiring them. |
| 154 * | 163 * |
| 155 * The result is only available for targets representing a Dart library. | 164 * The result is only available for targets representing a Dart library. |
| 156 */ | 165 */ |
| 157 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT6 = | 166 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT6 = |
| 158 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT6', null); | 167 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT6', null); |
| 159 | 168 |
| 160 /** | 169 /** |
| 170 * The errors produced while parsing a compilation unit. |
| 171 * |
| 172 * The list will be empty if there were no errors, but will not be `null`. |
| 173 * |
| 174 * The result is only available for targets representing a Dart compilation unit
. |
| 175 */ |
| 176 final ResultDescriptor<List<AnalysisError>> PARSE_ERRORS = |
| 177 new ResultDescriptor<List<AnalysisError>>( |
| 178 'PARSE_ERRORS', AnalysisError.NO_ERRORS, contributesTo: DART_ERRORS); |
| 179 |
| 180 /** |
| 161 * The errors produced while resolving references. | 181 * The errors produced while resolving references. |
| 162 * | 182 * |
| 163 * The list will be empty if there were no errors, but will not be `null`. | 183 * The list will be empty if there were no errors, but will not be `null`. |
| 164 * | 184 * |
| 165 * The result is only available for targets representing a unit. | 185 * The result is only available for targets representing a unit. |
| 166 */ | 186 */ |
| 167 final ResultDescriptor<List<AnalysisError>> RESOLVE_REFERENCES_ERRORS = | 187 final ResultDescriptor<List<AnalysisError>> RESOLVE_REFERENCES_ERRORS = |
| 168 new ResultDescriptor<List<AnalysisError>>( | 188 new ResultDescriptor<List<AnalysisError>>( |
| 169 'RESOLVE_REFERENCES_ERRORS', AnalysisError.NO_ERRORS, | 189 'RESOLVE_REFERENCES_ERRORS', AnalysisError.NO_ERRORS, |
| 170 contributesTo: DART_ERRORS); | 190 contributesTo: DART_ERRORS); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 * The partially resolved [CompilationUnit] associated with a unit. | 245 * The partially resolved [CompilationUnit] associated with a unit. |
| 226 * | 246 * |
| 227 * [RESOLVED_UNIT4] plus resolved local variables and formal parameters. | 247 * [RESOLVED_UNIT4] plus resolved local variables and formal parameters. |
| 228 * | 248 * |
| 229 * The result is only available for targets representing a unit. | 249 * The result is only available for targets representing a unit. |
| 230 */ | 250 */ |
| 231 final ResultDescriptor<CompilationUnit> RESOLVED_UNIT5 = | 251 final ResultDescriptor<CompilationUnit> RESOLVED_UNIT5 = |
| 232 new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT5', null); | 252 new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT5', null); |
| 233 | 253 |
| 234 /** | 254 /** |
| 255 * The errors produced while scanning a compilation unit. |
| 256 * |
| 257 * The list will be empty if there were no errors, but will not be `null`. |
| 258 * |
| 259 * The result is only available for targets representing a Dart compilation unit
. |
| 260 */ |
| 261 final ResultDescriptor<List<AnalysisError>> SCAN_ERRORS = |
| 262 new ResultDescriptor<List<AnalysisError>>( |
| 263 'SCAN_ERRORS', AnalysisError.NO_ERRORS, contributesTo: DART_ERRORS); |
| 264 |
| 265 /** |
| 235 * The [TypeProvider] of the context. | 266 * The [TypeProvider] of the context. |
| 236 */ | 267 */ |
| 237 final ResultDescriptor<TypeProvider> TYPE_PROVIDER = | 268 final ResultDescriptor<TypeProvider> TYPE_PROVIDER = |
| 238 new ResultDescriptor<TypeProvider>('TYPE_PROVIDER', null); | 269 new ResultDescriptor<TypeProvider>('TYPE_PROVIDER', null); |
| 239 | 270 |
| 240 /** | 271 /** |
| 241 * A task that builds implicit constructors for a [ClassElement], or keeps | 272 * A task that builds implicit constructors for a [ClassElement], or keeps |
| 242 * the existing explicit constructors if the class has them. | 273 * the existing explicit constructors if the class has them. |
| 243 */ | 274 */ |
| 244 class BuildClassConstructorsTask extends SourceBasedAnalysisTask { | 275 class BuildClassConstructorsTask extends SourceBasedAnalysisTask { |
| (...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2159 } | 2190 } |
| 2160 | 2191 |
| 2161 /** | 2192 /** |
| 2162 * Create a [ScanDartTask] based on the given [target] in the given [context]. | 2193 * Create a [ScanDartTask] based on the given [target] in the given [context]. |
| 2163 */ | 2194 */ |
| 2164 static ScanDartTask createTask( | 2195 static ScanDartTask createTask( |
| 2165 AnalysisContext context, AnalysisTarget target) { | 2196 AnalysisContext context, AnalysisTarget target) { |
| 2166 return new ScanDartTask(context, target); | 2197 return new ScanDartTask(context, target); |
| 2167 } | 2198 } |
| 2168 } | 2199 } |
| OLD | NEW |