Chromium Code Reviews| 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.task.dart; | 5 library analyzer.task.dart; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| 11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
| 12 import 'package:analyzer/src/generated/utilities_general.dart'; | 12 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 13 import 'package:analyzer/src/task/dart.dart'; | 13 import 'package:analyzer/src/task/dart.dart'; |
| 14 import 'package:analyzer/task/model.dart'; | 14 import 'package:analyzer/task/model.dart'; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * The resolved [CompilationUnit] associated with a compilation unit, with | |
| 18 * constants resolved. | |
| 19 * | |
| 20 * The result is only available for [LibrarySpecificUnit]s. | |
| 21 */ | |
| 22 final ResultDescriptor<CompilationUnit> CONSTANT_RESOLVED_UNIT = | |
| 23 new ResultDescriptor<CompilationUnit>('CONSTANT_RESOLVED_UNIT', null, | |
| 24 cachingPolicy: AST_CACHING_POLICY); | |
| 25 | |
| 26 /** | |
| 17 * The analysis errors associated with a [Source] representing a compilation | 27 * The analysis errors associated with a [Source] representing a compilation |
| 18 * unit. | 28 * unit. |
| 19 */ | 29 */ |
| 20 final ListResultDescriptor<AnalysisError> DART_ERRORS = | 30 final ListResultDescriptor<AnalysisError> DART_ERRORS = |
| 21 new ListResultDescriptor<AnalysisError>( | 31 new ListResultDescriptor<AnalysisError>( |
| 22 'DART_ERRORS', AnalysisError.NO_ERRORS); | 32 'DART_ERRORS', AnalysisError.NO_ERRORS); |
| 23 | 33 |
| 24 /** | 34 /** |
| 25 * The sources of the libraries that are explicitly imported into a library. | 35 * The sources of the libraries that are explicitly imported into a library. |
| 26 * | 36 * |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 * | 107 * |
| 98 * The AST structure will not have resolution information associated with it. | 108 * The AST structure will not have resolution information associated with it. |
| 99 * | 109 * |
| 100 * The result is only available for [Source]s representing a compilation unit. | 110 * The result is only available for [Source]s representing a compilation unit. |
| 101 */ | 111 */ |
| 102 final ResultDescriptor<CompilationUnit> PARSED_UNIT = | 112 final ResultDescriptor<CompilationUnit> PARSED_UNIT = |
| 103 new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null, | 113 new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null, |
| 104 cachingPolicy: AST_CACHING_POLICY); | 114 cachingPolicy: AST_CACHING_POLICY); |
| 105 | 115 |
| 106 /** | 116 /** |
| 107 * The resolved [CompilationUnit] associated with a compilation unit. | 117 * The resolved [CompilationUnit] associated with a compilation unit, with |
| 118 * constants not yet resolved. | |
|
Brian Wilkerson
2015/05/11 20:48:45
I have to wonder how many clients want an AST in w
Paul Berry
2015/05/11 22:07:39
Good point. I will do this in a follow-up CL.
| |
| 108 * | 119 * |
| 109 * The result is only available for [LibrarySpecificUnit]s. | 120 * The result is only available for [LibrarySpecificUnit]s. |
| 110 */ | 121 */ |
| 111 final ResultDescriptor<CompilationUnit> RESOLVED_UNIT = | 122 final ResultDescriptor<CompilationUnit> RESOLVED_UNIT = |
| 112 new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT', null, | 123 new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT', null, |
| 113 cachingPolicy: AST_CACHING_POLICY); | 124 cachingPolicy: AST_CACHING_POLICY); |
| 114 | 125 |
| 115 /** | 126 /** |
| 116 * The kind of a [Source]. | 127 * The kind of a [Source]. |
| 117 */ | 128 */ |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 @override | 187 @override |
| 177 bool operator ==(other) { | 188 bool operator ==(other) { |
| 178 return other is LibrarySpecificUnit && | 189 return other is LibrarySpecificUnit && |
| 179 other.library == library && | 190 other.library == library && |
| 180 other.unit == unit; | 191 other.unit == unit; |
| 181 } | 192 } |
| 182 | 193 |
| 183 @override | 194 @override |
| 184 String toString() => '$unit in $library'; | 195 String toString() => '$unit in $library'; |
| 185 } | 196 } |
| OLD | NEW |