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.src.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1485 } | 1485 } |
| 1486 LibraryElementImpl libraryElement = | 1486 LibraryElementImpl libraryElement = |
| 1487 new LibraryElementImpl.forNode(owningContext, libraryNameNode); | 1487 new LibraryElementImpl.forNode(owningContext, libraryNameNode); |
| 1488 libraryElement.definingCompilationUnit = definingCompilationUnitElement; | 1488 libraryElement.definingCompilationUnit = definingCompilationUnitElement; |
| 1489 libraryElement.entryPoint = entryPoint; | 1489 libraryElement.entryPoint = entryPoint; |
| 1490 libraryElement.parts = sourcedCompilationUnits; | 1490 libraryElement.parts = sourcedCompilationUnits; |
| 1491 for (Directive directive in directivesToResolve) { | 1491 for (Directive directive in directivesToResolve) { |
| 1492 directive.element = libraryElement; | 1492 directive.element = libraryElement; |
| 1493 } | 1493 } |
| 1494 BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement); | 1494 BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement); |
| 1495 if (libraryDirective != null) { | 1495 // set the library documentation to the docs associated with the first |
| 1496 _setDoc(libraryElement, libraryDirective); | 1496 // directive in the compilation unit. |
| 1497 if (definingCompilationUnit.directives.isNotEmpty) { | |
| 1498 _setDoc(libraryElement, definingCompilationUnit.directives.first); | |
|
Brian Wilkerson
2016/01/22 22:44:52
Given that this was the only use of `libraryDirect
keertip
2016/01/23 00:12:04
Done.
| |
| 1497 } | 1499 } |
| 1500 | |
| 1498 // | 1501 // |
| 1499 // Record outputs. | 1502 // Record outputs. |
| 1500 // | 1503 // |
| 1501 outputs[BUILD_LIBRARY_ERRORS] = errors; | 1504 outputs[BUILD_LIBRARY_ERRORS] = errors; |
| 1502 outputs[LIBRARY_ELEMENT1] = libraryElement; | 1505 outputs[LIBRARY_ELEMENT1] = libraryElement; |
| 1503 outputs[IS_LAUNCHABLE] = entryPoint != null; | 1506 outputs[IS_LAUNCHABLE] = entryPoint != null; |
| 1504 } | 1507 } |
| 1505 | 1508 |
| 1506 /** | 1509 /** |
| 1507 * Return the top-level [FunctionElement] entry point, or `null` if the given | 1510 * Return the top-level [FunctionElement] entry point, or `null` if the given |
| (...skipping 3941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5449 | 5452 |
| 5450 @override | 5453 @override |
| 5451 bool moveNext() { | 5454 bool moveNext() { |
| 5452 if (_newSources.isEmpty) { | 5455 if (_newSources.isEmpty) { |
| 5453 return false; | 5456 return false; |
| 5454 } | 5457 } |
| 5455 currentTarget = _newSources.removeLast(); | 5458 currentTarget = _newSources.removeLast(); |
| 5456 return true; | 5459 return true; |
| 5457 } | 5460 } |
| 5458 } | 5461 } |
| OLD | NEW |