| 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'; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 /** | 145 /** |
| 146 * A specific compilation unit in a specific library. | 146 * A specific compilation unit in a specific library. |
| 147 * | 147 * |
| 148 * This kind of target is associated with information about a compilation unit | 148 * This kind of target is associated with information about a compilation unit |
| 149 * that differs based on the library that the unit is a part of. For example, | 149 * that differs based on the library that the unit is a part of. For example, |
| 150 * the result of resolving a compilation unit depends on the imports, which can | 150 * the result of resolving a compilation unit depends on the imports, which can |
| 151 * change if a single part is included in more than one library. | 151 * change if a single part is included in more than one library. |
| 152 */ | 152 */ |
| 153 class LibrarySpecificUnit implements AnalysisTarget { | 153 class LibrarySpecificUnit implements AnalysisTarget { |
| 154 static const List<LibrarySpecificUnit> EMPTY_LIST = |
| 155 const <LibrarySpecificUnit>[]; |
| 156 |
| 154 /** | 157 /** |
| 155 * The defining compilation unit of the library in which the [unit] | 158 * The defining compilation unit of the library in which the [unit] |
| 156 * is analyzed. | 159 * is analyzed. |
| 157 */ | 160 */ |
| 158 final Source library; | 161 final Source library; |
| 159 | 162 |
| 160 /** | 163 /** |
| 161 * The compilation unit which belongs to the [library]. | 164 * The compilation unit which belongs to the [library]. |
| 162 */ | 165 */ |
| 163 final Source unit; | 166 final Source unit; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 178 @override | 181 @override |
| 179 bool operator ==(other) { | 182 bool operator ==(other) { |
| 180 return other is LibrarySpecificUnit && | 183 return other is LibrarySpecificUnit && |
| 181 other.library == library && | 184 other.library == library && |
| 182 other.unit == unit; | 185 other.unit == unit; |
| 183 } | 186 } |
| 184 | 187 |
| 185 @override | 188 @override |
| 186 String toString() => '$unit in $library'; | 189 String toString() => '$unit in $library'; |
| 187 } | 190 } |
| OLD | NEW |