| 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 library engine.incremental_resolver; | 5 library engine.incremental_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:analyzer/src/services/lint.dart'; | 10 import 'package:analyzer/src/services/lint.dart'; |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 _enclosingUnit = node.element; | 1679 _enclosingUnit = node.element; |
| 1680 if (_enclosingUnit == null) { | 1680 if (_enclosingUnit == null) { |
| 1681 throw new AnalysisException( | 1681 throw new AnalysisException( |
| 1682 "Cannot create scope: compilation unit is not resolved"); | 1682 "Cannot create scope: compilation unit is not resolved"); |
| 1683 } | 1683 } |
| 1684 LibraryElement libraryElement = _enclosingUnit.library; | 1684 LibraryElement libraryElement = _enclosingUnit.library; |
| 1685 if (libraryElement == null) { | 1685 if (libraryElement == null) { |
| 1686 throw new AnalysisException( | 1686 throw new AnalysisException( |
| 1687 "Cannot create scope: compilation unit is not part of a library"); | 1687 "Cannot create scope: compilation unit is not part of a library"); |
| 1688 } | 1688 } |
| 1689 return new LibraryScope(libraryElement, _errorListener); | 1689 return new LibraryScope(libraryElement, |
| 1690 new LibraryImportScope(libraryElement, _errorListener), _errorListener); |
| 1690 } | 1691 } |
| 1691 | 1692 |
| 1692 /** | 1693 /** |
| 1693 * Return the context in which the given AST structure should be resolved. | 1694 * Return the context in which the given AST structure should be resolved. |
| 1694 * | 1695 * |
| 1695 * [node] - the root of the AST structure to be resolved. | 1696 * [node] - the root of the AST structure to be resolved. |
| 1696 * [errorListener] - the listener to which analysis errors will be reported. | 1697 * [errorListener] - the listener to which analysis errors will be reported. |
| 1697 * | 1698 * |
| 1698 * Throws [AnalysisException] if the AST structure has not been resolved or | 1699 * Throws [AnalysisException] if the AST structure has not been resolved or |
| 1699 * is not part of a [CompilationUnit] | 1700 * is not part of a [CompilationUnit] |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1810 @override | 1811 @override |
| 1811 String toString() => name; | 1812 String toString() => name; |
| 1812 } | 1813 } |
| 1813 | 1814 |
| 1814 class _TokenPair { | 1815 class _TokenPair { |
| 1815 final _TokenDifferenceKind kind; | 1816 final _TokenDifferenceKind kind; |
| 1816 final Token oldToken; | 1817 final Token oldToken; |
| 1817 final Token newToken; | 1818 final Token newToken; |
| 1818 _TokenPair(this.kind, this.oldToken, this.newToken); | 1819 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1819 } | 1820 } |
| OLD | NEW |