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

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

Issue 1127183003: Rename EMPTY_ARRAY to EMPTY_LIST (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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) 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 14 matching lines...) Expand all
25 25
26 /** 26 /**
27 * The sources of the libraries that are explicitly imported into a library. 27 * The sources of the libraries that are explicitly imported into a library.
28 * 28 *
29 * The list will be empty if there are no explicit imports, but will not be 29 * The list will be empty if there are no explicit imports, but will not be
30 * `null`. 30 * `null`.
31 * 31 *
32 * The result is only available for targets representing a Dart library. 32 * The result is only available for targets representing a Dart library.
33 */ 33 */
34 final ListResultDescriptor<Source> EXPLICITLY_IMPORTED_LIBRARIES = 34 final ListResultDescriptor<Source> EXPLICITLY_IMPORTED_LIBRARIES =
35 new ListResultDescriptor<Source>('EXPLICITLY_IMPORTED_LIBRARIES', Source.EMP TY_ARRAY); 35 new ListResultDescriptor<Source>(
36 'EXPLICITLY_IMPORTED_LIBRARIES', Source.EMPTY_LIST);
36 37
37 /** 38 /**
38 * The sources of the libraries that are exported from a library. 39 * The sources of the libraries that are exported from a library.
39 * 40 *
40 * The list will be empty if there are no exported libraries, but will not be 41 * The list will be empty if there are no exported libraries, but will not be
41 * `null`. 42 * `null`.
42 * 43 *
43 * The result is only available for targets representing a Dart library. 44 * The result is only available for targets representing a Dart library.
44 */ 45 */
45 final ListResultDescriptor<Source> EXPORTED_LIBRARIES = 46 final ListResultDescriptor<Source> EXPORTED_LIBRARIES =
46 new ListResultDescriptor<Source>('EXPORTED_LIBRARIES', Source.EMPTY_ARRAY); 47 new ListResultDescriptor<Source>('EXPORTED_LIBRARIES', Source.EMPTY_LIST);
47 48
48 /** 49 /**
49 * The sources of the libraries that are implicitly or explicitly imported into 50 * The sources of the libraries that are implicitly or explicitly imported into
50 * a library. 51 * a library.
51 * 52 *
52 * The list will minimally contain the source for `dart:core` because it is 53 * The list will minimally contain the source for `dart:core` because it is
53 * implicitly imported into every library, and therefore will never be `null`. 54 * implicitly imported into every library, and therefore will never be `null`.
54 * 55 *
55 * The result is only available for targets representing a Dart library. 56 * The result is only available for targets representing a Dart library.
56 */ 57 */
57 final ListResultDescriptor<Source> IMPORTED_LIBRARIES = 58 final ListResultDescriptor<Source> IMPORTED_LIBRARIES =
58 new ListResultDescriptor<Source>('IMPORTED_LIBRARIES', Source.EMPTY_ARRAY); 59 new ListResultDescriptor<Source>('IMPORTED_LIBRARIES', Source.EMPTY_LIST);
59 60
60 /** 61 /**
61 * The sources of the parts that are included in a library. 62 * The sources of the parts that are included in a library.
62 * 63 *
63 * The list will be empty if there are no parts, but will not be `null`. The 64 * The list will be empty if there are no parts, but will not be `null`. The
64 * list does *not* include the source for the defining compilation unit. 65 * list does *not* include the source for the defining compilation unit.
65 * 66 *
66 * The result is only available for targets representing a Dart library. 67 * The result is only available for targets representing a Dart library.
67 */ 68 */
68 final ListResultDescriptor<Source> INCLUDED_PARTS = 69 final ListResultDescriptor<Source> INCLUDED_PARTS =
69 new ListResultDescriptor<Source>('INCLUDED_PARTS', Source.EMPTY_ARRAY); 70 new ListResultDescriptor<Source>('INCLUDED_PARTS', Source.EMPTY_LIST);
70 71
71 /** 72 /**
72 * A flag specifying whether a library is dependent on code that is only 73 * A flag specifying whether a library is dependent on code that is only
73 * available in a client. 74 * available in a client.
74 * 75 *
75 * The result is only available for targets representing a Dart library. 76 * The result is only available for targets representing a Dart library.
76 */ 77 */
77 final ResultDescriptor<bool> IS_CLIENT = 78 final ResultDescriptor<bool> IS_CLIENT =
78 new ResultDescriptor<bool>('IS_CLIENT', false); 79 new ResultDescriptor<bool>('IS_CLIENT', false);
79 80
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 /** 126 /**
126 * The sources of the Dart files that a library consists of. 127 * The sources of the Dart files that a library consists of.
127 * 128 *
128 * The list will include the source of the defining unit and [INCLUDED_PARTS]. 129 * The list will include the source of the defining unit and [INCLUDED_PARTS].
129 * So, it is never empty or `null`. 130 * So, it is never empty or `null`.
130 * 131 *
131 * The result is only available for targets representing a Dart library. 132 * The result is only available for targets representing a Dart library.
132 */ 133 */
133 final ListResultDescriptor<Source> UNITS = 134 final ListResultDescriptor<Source> UNITS =
134 new ListResultDescriptor<Source>('UNITS', Source.EMPTY_ARRAY); 135 new ListResultDescriptor<Source>('UNITS', Source.EMPTY_LIST);
135 136
136 /** 137 /**
137 * A specific compilation unit in a specific library. 138 * A specific compilation unit in a specific library.
138 * 139 *
139 * This kind of target is associated with information about a compilation unit 140 * This kind of target is associated with information about a compilation unit
140 * that differs based on the library that the unit is a part of. For example, 141 * that differs based on the library that the unit is a part of. For example,
141 * the result of resolving a compilation unit depends on the imports, which can 142 * the result of resolving a compilation unit depends on the imports, which can
142 * change if a single part is included in more than one library. 143 * change if a single part is included in more than one library.
143 */ 144 */
144 class LibrarySpecificUnit implements AnalysisTarget { 145 class LibrarySpecificUnit implements AnalysisTarget {
(...skipping 24 matching lines...) Expand all
169 @override 170 @override
170 bool operator ==(other) { 171 bool operator ==(other) {
171 return other is LibrarySpecificUnit && 172 return other is LibrarySpecificUnit &&
172 other.library == library && 173 other.library == library &&
173 other.unit == unit; 174 other.unit == unit;
174 } 175 }
175 176
176 @override 177 @override
177 String toString() => '$unit in $library'; 178 String toString() => '$unit in $library';
178 } 179 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698