| 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.src.generated.incremental_resolver; | 5 library analyzer.src.generated.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/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 return false; | 1615 return false; |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 CompilationUnit _parseUnit(String code) { | 1618 CompilationUnit _parseUnit(String code) { |
| 1619 LoggingTimer timer = logger.startTimer(); | 1619 LoggingTimer timer = logger.startTimer(); |
| 1620 try { | 1620 try { |
| 1621 Token token = _scan(code); | 1621 Token token = _scan(code); |
| 1622 RecordingErrorListener errorListener = new RecordingErrorListener(); | 1622 RecordingErrorListener errorListener = new RecordingErrorListener(); |
| 1623 Parser parser = new Parser(_unitSource, errorListener); | 1623 Parser parser = new Parser(_unitSource, errorListener); |
| 1624 AnalysisOptions options = _unitElement.context.analysisOptions; | 1624 AnalysisOptions options = _unitElement.context.analysisOptions; |
| 1625 parser.parseConditionalDirectives = options.enableConditionalDirectives; | |
| 1626 parser.parseGenericMethods = options.enableGenericMethods; | 1625 parser.parseGenericMethods = options.enableGenericMethods; |
| 1627 CompilationUnit unit = parser.parseCompilationUnit(token); | 1626 CompilationUnit unit = parser.parseCompilationUnit(token); |
| 1628 _newParseErrors = errorListener.errors; | 1627 _newParseErrors = errorListener.errors; |
| 1629 return unit; | 1628 return unit; |
| 1630 } finally { | 1629 } finally { |
| 1631 timer.stop('parse'); | 1630 timer.stop('parse'); |
| 1632 } | 1631 } |
| 1633 } | 1632 } |
| 1634 | 1633 |
| 1635 /** | 1634 /** |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 @override | 2235 @override |
| 2237 String toString() => name; | 2236 String toString() => name; |
| 2238 } | 2237 } |
| 2239 | 2238 |
| 2240 class _TokenPair { | 2239 class _TokenPair { |
| 2241 final _TokenDifferenceKind kind; | 2240 final _TokenDifferenceKind kind; |
| 2242 final Token oldToken; | 2241 final Token oldToken; |
| 2243 final Token newToken; | 2242 final Token newToken; |
| 2244 _TokenPair(this.kind, this.oldToken, this.newToken); | 2243 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 2245 } | 2244 } |
| OLD | NEW |