OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.task.dart; | 5 library analyzer.src.task.dart; |
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 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2685 void internalPerform() { | 2685 void internalPerform() { |
2686 Source source = getRequiredSource(); | 2686 Source source = getRequiredSource(); |
2687 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); | 2687 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); |
2688 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); | 2688 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); |
2689 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); | 2689 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); |
2690 | 2690 |
2691 RecordingErrorListener errorListener = new RecordingErrorListener(); | 2691 RecordingErrorListener errorListener = new RecordingErrorListener(); |
2692 Parser parser = new Parser(source, errorListener); | 2692 Parser parser = new Parser(source, errorListener); |
2693 AnalysisOptions options = context.analysisOptions; | 2693 AnalysisOptions options = context.analysisOptions; |
2694 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); | 2694 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); |
| 2695 parser.parseGenericMethods = options.enableGenericMethods; |
2695 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); | 2696 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); |
2696 unit.lineInfo = lineInfo; | 2697 unit.lineInfo = lineInfo; |
2697 | 2698 |
2698 bool hasNonPartOfDirective = false; | 2699 bool hasNonPartOfDirective = false; |
2699 bool hasPartOfDirective = false; | 2700 bool hasPartOfDirective = false; |
2700 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); | 2701 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); |
2701 HashSet<Source> exportedSourceSet = new HashSet<Source>(); | 2702 HashSet<Source> exportedSourceSet = new HashSet<Source>(); |
2702 HashSet<Source> includedSourceSet = new HashSet<Source>(); | 2703 HashSet<Source> includedSourceSet = new HashSet<Source>(); |
2703 for (Directive directive in unit.directives) { | 2704 for (Directive directive in unit.directives) { |
2704 if (directive is PartOfDirective) { | 2705 if (directive is PartOfDirective) { |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3675 | 3676 |
3676 @override | 3677 @override |
3677 bool moveNext() { | 3678 bool moveNext() { |
3678 if (_newSources.isEmpty) { | 3679 if (_newSources.isEmpty) { |
3679 return false; | 3680 return false; |
3680 } | 3681 } |
3681 currentTarget = _newSources.removeLast(); | 3682 currentTarget = _newSources.removeLast(); |
3682 return true; | 3683 return true; |
3683 } | 3684 } |
3684 } | 3685 } |
OLD | NEW |