| 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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 // resolve references in the comment | 1500 // resolve references in the comment |
| 1501 incrementalResolver._resolveReferences(newComment); | 1501 incrementalResolver._resolveReferences(newComment); |
| 1502 // OK | 1502 // OK |
| 1503 return true; | 1503 return true; |
| 1504 } | 1504 } |
| 1505 | 1505 |
| 1506 Token _scan(String code) { | 1506 Token _scan(String code) { |
| 1507 RecordingErrorListener errorListener = new RecordingErrorListener(); | 1507 RecordingErrorListener errorListener = new RecordingErrorListener(); |
| 1508 CharSequenceReader reader = new CharSequenceReader(code); | 1508 CharSequenceReader reader = new CharSequenceReader(code); |
| 1509 Scanner scanner = new Scanner(_unitSource, reader, errorListener); | 1509 Scanner scanner = new Scanner(_unitSource, reader, errorListener); |
| 1510 scanner.enableNullAwareOperators = _options.enableNullAwareOperators; | |
| 1511 Token token = scanner.tokenize(); | 1510 Token token = scanner.tokenize(); |
| 1512 _newScanErrors = errorListener.errors; | 1511 _newScanErrors = errorListener.errors; |
| 1513 return token; | 1512 return token; |
| 1514 } | 1513 } |
| 1515 | 1514 |
| 1516 /** | 1515 /** |
| 1517 * Set the given [comment] as a "precedingComments" for [token]. | 1516 * Set the given [comment] as a "precedingComments" for [token]. |
| 1518 */ | 1517 */ |
| 1519 void _setPrecedingComments(Token token, CommentToken comment) { | 1518 void _setPrecedingComments(Token token, CommentToken comment) { |
| 1520 if (token is BeginTokenWithComment) { | 1519 if (token is BeginTokenWithComment) { |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1980 @override | 1979 @override |
| 1981 String toString() => name; | 1980 String toString() => name; |
| 1982 } | 1981 } |
| 1983 | 1982 |
| 1984 class _TokenPair { | 1983 class _TokenPair { |
| 1985 final _TokenDifferenceKind kind; | 1984 final _TokenDifferenceKind kind; |
| 1986 final Token oldToken; | 1985 final Token oldToken; |
| 1987 final Token newToken; | 1986 final Token newToken; |
| 1988 _TokenPair(this.kind, this.oldToken, this.newToken); | 1987 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1989 } | 1988 } |
| OLD | NEW |