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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 logger.exit(); | 1473 logger.exit(); |
1474 } | 1474 } |
1475 return false; | 1475 return false; |
1476 } | 1476 } |
1477 | 1477 |
1478 CompilationUnit _parseUnit(String code) { | 1478 CompilationUnit _parseUnit(String code) { |
1479 LoggingTimer timer = logger.startTimer(); | 1479 LoggingTimer timer = logger.startTimer(); |
1480 try { | 1480 try { |
1481 Token token = _scan(code); | 1481 Token token = _scan(code); |
1482 RecordingErrorListener errorListener = new RecordingErrorListener(); | 1482 RecordingErrorListener errorListener = new RecordingErrorListener(); |
1483 Parser parser = new Parser(_unitSource, errorListener); | 1483 Parser parser = new Parser(_unitSource, errorListener, |
| 1484 enableAssertMessage: _options.enableAssertMessage); |
1484 AnalysisOptions options = _unitElement.context.analysisOptions; | 1485 AnalysisOptions options = _unitElement.context.analysisOptions; |
1485 parser.parseGenericMethods = options.enableGenericMethods; | 1486 parser.parseGenericMethods = options.enableGenericMethods; |
1486 CompilationUnit unit = parser.parseCompilationUnit(token); | 1487 CompilationUnit unit = parser.parseCompilationUnit(token); |
1487 _newParseErrors = errorListener.errors; | 1488 _newParseErrors = errorListener.errors; |
1488 return unit; | 1489 return unit; |
1489 } finally { | 1490 } finally { |
1490 timer.stop('parse'); | 1491 timer.stop('parse'); |
1491 } | 1492 } |
1492 } | 1493 } |
1493 | 1494 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 @override | 2016 @override |
2016 String toString() => name; | 2017 String toString() => name; |
2017 } | 2018 } |
2018 | 2019 |
2019 class _TokenPair { | 2020 class _TokenPair { |
2020 final _TokenDifferenceKind kind; | 2021 final _TokenDifferenceKind kind; |
2021 final Token oldToken; | 2022 final Token oldToken; |
2022 final Token newToken; | 2023 final Token newToken; |
2023 _TokenPair(this.kind, this.oldToken, this.newToken); | 2024 _TokenPair(this.kind, this.oldToken, this.newToken); |
2024 } | 2025 } |
OLD | NEW |