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/context/cache.dart' | 10 import 'package:analyzer/src/context/cache.dart' |
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 } else { | 1708 } else { |
1709 _updateEntry_NEW(); | 1709 _updateEntry_NEW(); |
1710 } | 1710 } |
1711 } | 1711 } |
1712 | 1712 |
1713 void _updateEntry_NEW() { | 1713 void _updateEntry_NEW() { |
1714 // scan results | 1714 // scan results |
1715 _newSourceEntry.setValueIncremental(SCAN_ERRORS, _newScanErrors, true); | 1715 _newSourceEntry.setValueIncremental(SCAN_ERRORS, _newScanErrors, true); |
1716 _newSourceEntry.setValueIncremental(LINE_INFO, _newLineInfo, false); | 1716 _newSourceEntry.setValueIncremental(LINE_INFO, _newLineInfo, false); |
1717 // parse results | 1717 // parse results |
1718 _newSourceEntry.setValueIncremental(PARSE_ERRORS, _newScanErrors, true); | 1718 _newSourceEntry.setValueIncremental(PARSE_ERRORS, _newParseErrors, true); |
1719 _newSourceEntry.setValueIncremental(PARSED_UNIT, _newScanErrors, false); | 1719 _newSourceEntry.setValueIncremental(PARSED_UNIT, _oldUnit, false); |
1720 } | 1720 } |
1721 | 1721 |
1722 void _updateEntry_OLD() { | 1722 void _updateEntry_OLD() { |
1723 _oldEntry.setValue(SourceEntry.LINE_INFO, _newLineInfo); | 1723 _oldEntry.setValue(SourceEntry.LINE_INFO, _newLineInfo); |
1724 _oldEntry.setValue(DartEntry.SCAN_ERRORS, _newScanErrors); | 1724 _oldEntry.setValue(DartEntry.SCAN_ERRORS, _newScanErrors); |
1725 _oldEntry.setValue(DartEntry.PARSE_ERRORS, _newParseErrors); | 1725 _oldEntry.setValue(DartEntry.PARSE_ERRORS, _newParseErrors); |
1726 } | 1726 } |
1727 | 1727 |
1728 /** | 1728 /** |
1729 * Checks if [token] has a balanced number of open and closed curly brackets. | 1729 * Checks if [token] has a balanced number of open and closed curly brackets. |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 @override | 2126 @override |
2127 String toString() => name; | 2127 String toString() => name; |
2128 } | 2128 } |
2129 | 2129 |
2130 class _TokenPair { | 2130 class _TokenPair { |
2131 final _TokenDifferenceKind kind; | 2131 final _TokenDifferenceKind kind; |
2132 final Token oldToken; | 2132 final Token oldToken; |
2133 final Token newToken; | 2133 final Token newToken; |
2134 _TokenPair(this.kind, this.oldToken, this.newToken); | 2134 _TokenPair(this.kind, this.oldToken, this.newToken); |
2135 } | 2135 } |
OLD | NEW |