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/standard_resolution_map.dart'; | 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| (...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1611 } | 1611 } |
| 1612 } | 1612 } |
| 1613 if (entryPoint == null) { | 1613 if (entryPoint == null) { |
| 1614 entryPoint = _findEntryPoint(partElement); | 1614 entryPoint = _findEntryPoint(partElement); |
| 1615 } | 1615 } |
| 1616 directive.element = partElement; | 1616 directive.element = partElement; |
| 1617 sourcedCompilationUnits.add(partElement); | 1617 sourcedCompilationUnits.add(partElement); |
| 1618 } | 1618 } |
| 1619 } | 1619 } |
| 1620 } | 1620 } |
| 1621 if (hasPartDirective && libraryNameNode == null) { | 1621 if (hasPartDirective && libraryNameNode == null && |
| 1622 !context.analysisOptions.enableUriInPartOf) { | |
|
Brian Wilkerson
2017/01/25 17:05:14
Will we issue a warning if a part file contains a
Lasse Reichstein Nielsen
2017/01/26 10:39:13
It's still a warning, and I don't think there is a
| |
| 1622 AnalysisError error; | 1623 AnalysisError error; |
| 1623 if (partsLibraryName != _UNKNOWN_LIBRARY_NAME && | 1624 if (partsLibraryName != _UNKNOWN_LIBRARY_NAME && |
| 1624 partsLibraryName != null) { | 1625 partsLibraryName != null) { |
| 1625 error = new AnalysisErrorWithProperties(librarySource, 0, 0, | 1626 error = new AnalysisErrorWithProperties(librarySource, 0, 0, |
| 1626 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART) | 1627 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART) |
| 1627 ..setProperty(ErrorProperty.PARTS_LIBRARY_NAME, partsLibraryName); | 1628 ..setProperty(ErrorProperty.PARTS_LIBRARY_NAME, partsLibraryName); |
| 1628 } else { | 1629 } else { |
| 1629 error = new AnalysisError(librarySource, 0, 0, | 1630 error = new AnalysisError(librarySource, 0, 0, |
| 1630 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART); | 1631 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART); |
| 1631 } | 1632 } |
| (...skipping 4919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6551 | 6552 |
| 6552 @override | 6553 @override |
| 6553 bool moveNext() { | 6554 bool moveNext() { |
| 6554 if (_newSources.isEmpty) { | 6555 if (_newSources.isEmpty) { |
| 6555 return false; | 6556 return false; |
| 6556 } | 6557 } |
| 6557 currentTarget = _newSources.removeLast(); | 6558 currentTarget = _newSources.removeLast(); |
| 6558 return true; | 6559 return true; |
| 6559 } | 6560 } |
| 6560 } | 6561 } |
| OLD | NEW |