| 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_test; | 5 library engine.incremental_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/engine.dart'; | 9 import 'package:analyzer/src/generated/engine.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2793 | 2793 |
| 2794 void _runTasks() { | 2794 void _runTasks() { |
| 2795 AnalysisResult result = analysisContext.performAnalysisTask(); | 2795 AnalysisResult result = analysisContext.performAnalysisTask(); |
| 2796 while (result.changeNotices != null) { | 2796 while (result.changeNotices != null) { |
| 2797 result = analysisContext.performAnalysisTask(); | 2797 result = analysisContext.performAnalysisTask(); |
| 2798 } | 2798 } |
| 2799 } | 2799 } |
| 2800 | 2800 |
| 2801 static AstNode _findNodeAt( | 2801 static AstNode _findNodeAt( |
| 2802 CompilationUnit oldUnit, int offset, Predicate<AstNode> predicate) { | 2802 CompilationUnit oldUnit, int offset, Predicate<AstNode> predicate) { |
| 2803 NodeLocator locator = new NodeLocator.con1(offset); | 2803 NodeLocator locator = new NodeLocator(offset); |
| 2804 AstNode node = locator.searchWithin(oldUnit); | 2804 AstNode node = locator.searchWithin(oldUnit); |
| 2805 return node.getAncestor(predicate); | 2805 return node.getAncestor(predicate); |
| 2806 } | 2806 } |
| 2807 | 2807 |
| 2808 static bool _isBlock(AstNode node) => node is Block; | 2808 static bool _isBlock(AstNode node) => node is Block; |
| 2809 | 2809 |
| 2810 static bool _isClassMember(AstNode node) => node is ClassMember; | 2810 static bool _isClassMember(AstNode node) => node is ClassMember; |
| 2811 | 2811 |
| 2812 static bool _isDeclaration(AstNode node) => node is Declaration; | 2812 static bool _isDeclaration(AstNode node) => node is Declaration; |
| 2813 | 2813 |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4099 return ResolutionContextBuilder.contextFor(node, listener).scope; | 4099 return ResolutionContextBuilder.contextFor(node, listener).scope; |
| 4100 } | 4100 } |
| 4101 } | 4101 } |
| 4102 | 4102 |
| 4103 class _Edit { | 4103 class _Edit { |
| 4104 final int offset; | 4104 final int offset; |
| 4105 final int length; | 4105 final int length; |
| 4106 final String replacement; | 4106 final String replacement; |
| 4107 _Edit(this.offset, this.length, this.replacement); | 4107 _Edit(this.offset, this.length, this.replacement); |
| 4108 } | 4108 } |
| OLD | NEW |