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

Side by Side Diff: pkg/analyzer/lib/task/dart.dart

Issue 1422793002: Use LIBRARY_SPECIFIC_UNITS instead of UNITS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698