| 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.test.generated.incremental_resolver_test; | 5 library analyzer.test.generated.incremental_resolver_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
| (...skipping 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 static CompilationUnit _parseUnit(String code) { | 3549 static CompilationUnit _parseUnit(String code) { |
| 3550 var errorListener = new BooleanErrorListener(); | 3550 var errorListener = new BooleanErrorListener(); |
| 3551 var reader = new CharSequenceReader(code); | 3551 var reader = new CharSequenceReader(code); |
| 3552 var scanner = new Scanner(null, reader, errorListener); | 3552 var scanner = new Scanner(null, reader, errorListener); |
| 3553 var token = scanner.tokenize(); | 3553 var token = scanner.tokenize(); |
| 3554 var parser = new Parser(null, errorListener); | 3554 var parser = new Parser(null, errorListener); |
| 3555 return parser.parseCompilationUnit(token); | 3555 return parser.parseCompilationUnit(token); |
| 3556 } | 3556 } |
| 3557 | 3557 |
| 3558 static void _shiftTokens(Token token, int afterOffset, int delta) { | 3558 static void _shiftTokens(Token token, int afterOffset, int delta) { |
| 3559 while (token.type != TokenType.EOF) { | 3559 while (true) { |
| 3560 if (token.offset >= afterOffset) { | 3560 if (token.offset > afterOffset) { |
| 3561 token.applyDelta(delta); | 3561 token.applyDelta(delta); |
| 3562 } | 3562 } |
| 3563 if (token.type == TokenType.EOF) { |
| 3564 break; |
| 3565 } |
| 3563 token = token.next; | 3566 token = token.next; |
| 3564 } | 3567 } |
| 3565 } | 3568 } |
| 3566 } | 3569 } |
| 3567 | 3570 |
| 3568 /** | 3571 /** |
| 3569 * The test for [poorMansIncrementalResolution] function and its integration | 3572 * The test for [poorMansIncrementalResolution] function and its integration |
| 3570 * into [AnalysisContext]. | 3573 * into [AnalysisContext]. |
| 3571 */ | 3574 */ |
| 3572 @reflectiveTest | 3575 @reflectiveTest |
| (...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5312 void logException(Object exception, [Object stackTrace]) { | 5315 void logException(Object exception, [Object stackTrace]) { |
| 5313 lastException = exception; | 5316 lastException = exception; |
| 5314 lastStackTrace = stackTrace; | 5317 lastStackTrace = stackTrace; |
| 5315 } | 5318 } |
| 5316 | 5319 |
| 5317 @override | 5320 @override |
| 5318 logging.LoggingTimer startTimer() { | 5321 logging.LoggingTimer startTimer() { |
| 5319 return new logging.LoggingTimer(this); | 5322 return new logging.LoggingTimer(this); |
| 5320 } | 5323 } |
| 5321 } | 5324 } |
| OLD | NEW |