| 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 analyzer.src.generated.incremental_resolver; | 5 library analyzer.src.generated.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/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 _enclosingUnit = node.element; | 1167 _enclosingUnit = node.element; |
| 1168 if (_enclosingUnit == null) { | 1168 if (_enclosingUnit == null) { |
| 1169 throw new AnalysisException( | 1169 throw new AnalysisException( |
| 1170 "Cannot create scope: compilation unit is not resolved"); | 1170 "Cannot create scope: compilation unit is not resolved"); |
| 1171 } | 1171 } |
| 1172 LibraryElement libraryElement = _enclosingUnit.library; | 1172 LibraryElement libraryElement = _enclosingUnit.library; |
| 1173 if (libraryElement == null) { | 1173 if (libraryElement == null) { |
| 1174 throw new AnalysisException( | 1174 throw new AnalysisException( |
| 1175 "Cannot create scope: compilation unit is not part of a library"); | 1175 "Cannot create scope: compilation unit is not part of a library"); |
| 1176 } | 1176 } |
| 1177 return new LibraryScope(libraryElement, _errorListener); | 1177 return new LibraryScope(libraryElement); |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 /** | 1180 /** |
| 1181 * Return the context in which the given AST structure should be resolved. | 1181 * Return the context in which the given AST structure should be resolved. |
| 1182 * | 1182 * |
| 1183 * [node] - the root of the AST structure to be resolved. | 1183 * [node] - the root of the AST structure to be resolved. |
| 1184 * [errorListener] - the listener to which analysis errors will be reported. | 1184 * [errorListener] - the listener to which analysis errors will be reported. |
| 1185 * | 1185 * |
| 1186 * Throws [AnalysisException] if the AST structure has not been resolved or | 1186 * Throws [AnalysisException] if the AST structure has not been resolved or |
| 1187 * is not part of a [CompilationUnit] | 1187 * is not part of a [CompilationUnit] |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 @override | 1319 @override |
| 1320 String toString() => name; | 1320 String toString() => name; |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 class _TokenPair { | 1323 class _TokenPair { |
| 1324 final _TokenDifferenceKind kind; | 1324 final _TokenDifferenceKind kind; |
| 1325 final Token oldToken; | 1325 final Token oldToken; |
| 1326 final Token newToken; | 1326 final Token newToken; |
| 1327 _TokenPair(this.kind, this.oldToken, this.newToken); | 1327 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1328 } | 1328 } |
| OLD | NEW |