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/src/task/dart.dart

Issue 2640853005: Make Analyzer, VM and dart2js accept URI strings as part-of library identifier. (Closed)
Patch Set: Status fixes Created 3 years, 9 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.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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 } 1619 }
1620 } 1620 }
1621 if (entryPoint == null) { 1621 if (entryPoint == null) {
1622 entryPoint = _findEntryPoint(partElement); 1622 entryPoint = _findEntryPoint(partElement);
1623 } 1623 }
1624 directive.element = partElement; 1624 directive.element = partElement;
1625 sourcedCompilationUnits.add(partElement); 1625 sourcedCompilationUnits.add(partElement);
1626 } 1626 }
1627 } 1627 }
1628 } 1628 }
1629 if (hasPartDirective && libraryNameNode == null) { 1629 if (hasPartDirective && libraryNameNode == null &&
1630 !context.analysisOptions.enableUriInPartOf) {
1630 errors.add(new AnalysisError(librarySource, 0, 0, 1631 errors.add(new AnalysisError(librarySource, 0, 0,
1631 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART)); 1632 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART));
1632 } 1633 }
1633 // 1634 //
1634 // Create and populate the library element. 1635 // Create and populate the library element.
1635 // 1636 //
1636 AnalysisContext owningContext = context; 1637 AnalysisContext owningContext = context;
1637 if (context is InternalAnalysisContext) { 1638 if (context is InternalAnalysisContext) {
1638 InternalAnalysisContext internalContext = context; 1639 InternalAnalysisContext internalContext = context;
1639 owningContext = internalContext.getContextFor(librarySource); 1640 owningContext = internalContext.getContextFor(librarySource);
(...skipping 4914 matching lines...) Expand 10 before | Expand all | Expand 10 after
6554 6555
6555 @override 6556 @override
6556 bool moveNext() { 6557 bool moveNext() {
6557 if (_newSources.isEmpty) { 6558 if (_newSources.isEmpty) {
6558 return false; 6559 return false;
6559 } 6560 }
6560 currentTarget = _newSources.removeLast(); 6561 currentTarget = _newSources.removeLast();
6561 return true; 6562 return true;
6562 } 6563 }
6563 } 6564 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698