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

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

Issue 2706123002: Remove AnalysisErrorWithProperties and ErrorProperty. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/error/listener.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 AnalysisError error; 1630 errors.add(new AnalysisError(librarySource, 0, 0,
1631 if (partsLibraryName != _UNKNOWN_LIBRARY_NAME && 1631 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART));
1632 partsLibraryName != null) {
1633 error = new AnalysisErrorWithProperties(librarySource, 0, 0,
1634 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART)
1635 ..setProperty(ErrorProperty.PARTS_LIBRARY_NAME, partsLibraryName);
1636 } else {
1637 error = new AnalysisError(librarySource, 0, 0,
1638 ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART);
1639 }
1640 errors.add(error);
1641 } 1632 }
1642 // 1633 //
1643 // Create and populate the library element. 1634 // Create and populate the library element.
1644 // 1635 //
1645 AnalysisContext owningContext = context; 1636 AnalysisContext owningContext = context;
1646 if (context is InternalAnalysisContext) { 1637 if (context is InternalAnalysisContext) {
1647 InternalAnalysisContext internalContext = context; 1638 InternalAnalysisContext internalContext = context;
1648 owningContext = internalContext.getContextFor(librarySource); 1639 owningContext = internalContext.getContextFor(librarySource);
1649 } 1640 }
1650 // 1641 //
(...skipping 4912 matching lines...) Expand 10 before | Expand all | Expand 10 after
6563 6554
6564 @override 6555 @override
6565 bool moveNext() { 6556 bool moveNext() {
6566 if (_newSources.isEmpty) { 6557 if (_newSources.isEmpty) {
6567 return false; 6558 return false;
6568 } 6559 }
6569 currentTarget = _newSources.removeLast(); 6560 currentTarget = _newSources.removeLast();
6570 return true; 6561 return true;
6571 } 6562 }
6572 } 6563 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/listener.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698