| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.element; | 8 library engine.element; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 @deprecated // Use CompilationUnitElement.EMPTY_LIST | 1269 @deprecated // Use CompilationUnitElement.EMPTY_LIST |
| 1270 static const List<CompilationUnitElement> EMPTY_ARRAY = | 1270 static const List<CompilationUnitElement> EMPTY_ARRAY = |
| 1271 const <CompilationUnitElement>[]; | 1271 const <CompilationUnitElement>[]; |
| 1272 | 1272 |
| 1273 /** | 1273 /** |
| 1274 * The source that corresponds to this compilation unit. | 1274 * The source that corresponds to this compilation unit. |
| 1275 */ | 1275 */ |
| 1276 Source source; | 1276 Source source; |
| 1277 | 1277 |
| 1278 /** | 1278 /** |
| 1279 * The source of the library containing this compilation unit. |
| 1280 * |
| 1281 * This is the same as the source of the containing [LibraryElement], |
| 1282 * except that it does not require the containing [LibraryElement] to be |
| 1283 * computed. |
| 1284 */ |
| 1285 Source librarySource; |
| 1286 |
| 1287 /** |
| 1279 * A list containing all of the top-level accessors (getters and setters) | 1288 * A list containing all of the top-level accessors (getters and setters) |
| 1280 * contained in this compilation unit. | 1289 * contained in this compilation unit. |
| 1281 */ | 1290 */ |
| 1282 List<PropertyAccessorElement> _accessors = PropertyAccessorElement.EMPTY_LIST; | 1291 List<PropertyAccessorElement> _accessors = PropertyAccessorElement.EMPTY_LIST; |
| 1283 | 1292 |
| 1284 /** | 1293 /** |
| 1285 * A list containing all of the enums contained in this compilation unit. | 1294 * A list containing all of the enums contained in this compilation unit. |
| 1286 */ | 1295 */ |
| 1287 List<ClassElement> _enums = ClassElement.EMPTY_LIST; | 1296 List<ClassElement> _enums = ClassElement.EMPTY_LIST; |
| 1288 | 1297 |
| (...skipping 5723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7012 | 7021 |
| 7013 @override | 7022 @override |
| 7014 CompilationUnitElement get definingCompilationUnit => | 7023 CompilationUnitElement get definingCompilationUnit => |
| 7015 _definingCompilationUnit; | 7024 _definingCompilationUnit; |
| 7016 | 7025 |
| 7017 /** | 7026 /** |
| 7018 * Set the compilation unit that defines this library to the given compilation | 7027 * Set the compilation unit that defines this library to the given compilation |
| 7019 * [unit]. | 7028 * [unit]. |
| 7020 */ | 7029 */ |
| 7021 void set definingCompilationUnit(CompilationUnitElement unit) { | 7030 void set definingCompilationUnit(CompilationUnitElement unit) { |
| 7031 assert((unit as CompilationUnitElementImpl).librarySource == unit.source); |
| 7022 (unit as CompilationUnitElementImpl).enclosingElement = this; | 7032 (unit as CompilationUnitElementImpl).enclosingElement = this; |
| 7023 this._definingCompilationUnit = unit; | 7033 this._definingCompilationUnit = unit; |
| 7024 } | 7034 } |
| 7025 | 7035 |
| 7026 @override | 7036 @override |
| 7027 List<LibraryElement> get exportedLibraries { | 7037 List<LibraryElement> get exportedLibraries { |
| 7028 HashSet<LibraryElement> libraries = new HashSet<LibraryElement>(); | 7038 HashSet<LibraryElement> libraries = new HashSet<LibraryElement>(); |
| 7029 for (ExportElement element in _exports) { | 7039 for (ExportElement element in _exports) { |
| 7030 LibraryElement library = element.exportedLibrary; | 7040 LibraryElement library = element.exportedLibrary; |
| 7031 if (library != null) { | 7041 if (library != null) { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7203 | 7213 |
| 7204 @override | 7214 @override |
| 7205 List<CompilationUnitElement> get parts => _parts; | 7215 List<CompilationUnitElement> get parts => _parts; |
| 7206 | 7216 |
| 7207 /** | 7217 /** |
| 7208 * Set the compilation units that are included in this library using a `part` | 7218 * Set the compilation units that are included in this library using a `part` |
| 7209 * directive to the given list of [parts]. | 7219 * directive to the given list of [parts]. |
| 7210 */ | 7220 */ |
| 7211 void set parts(List<CompilationUnitElement> parts) { | 7221 void set parts(List<CompilationUnitElement> parts) { |
| 7212 for (CompilationUnitElement compilationUnit in parts) { | 7222 for (CompilationUnitElement compilationUnit in parts) { |
| 7223 assert((compilationUnit as CompilationUnitElementImpl).librarySource == |
| 7224 source); |
| 7213 (compilationUnit as CompilationUnitElementImpl).enclosingElement = this; | 7225 (compilationUnit as CompilationUnitElementImpl).enclosingElement = this; |
| 7214 } | 7226 } |
| 7215 this._parts = parts; | 7227 this._parts = parts; |
| 7216 } | 7228 } |
| 7217 | 7229 |
| 7218 @override | 7230 @override |
| 7219 List<PrefixElement> get prefixes { | 7231 List<PrefixElement> get prefixes { |
| 7220 HashSet<PrefixElement> prefixes = new HashSet<PrefixElement>(); | 7232 HashSet<PrefixElement> prefixes = new HashSet<PrefixElement>(); |
| 7221 for (ImportElement element in _imports) { | 7233 for (ImportElement element in _imports) { |
| 7222 PrefixElement prefix = element.prefix; | 7234 PrefixElement prefix = element.prefix; |
| (...skipping 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10358 | 10370 |
| 10359 @override | 10371 @override |
| 10360 void visitElement(Element element) { | 10372 void visitElement(Element element) { |
| 10361 int offset = element.nameOffset; | 10373 int offset = element.nameOffset; |
| 10362 if (offset != -1) { | 10374 if (offset != -1) { |
| 10363 map[offset] = element; | 10375 map[offset] = element; |
| 10364 } | 10376 } |
| 10365 super.visitElement(element); | 10377 super.visitElement(element); |
| 10366 } | 10378 } |
| 10367 } | 10379 } |
| OLD | NEW |