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 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
(...skipping 5628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5639 RecordingErrorListener errorListener = new RecordingErrorListener(); | 5639 RecordingErrorListener errorListener = new RecordingErrorListener(); |
5640 // | 5640 // |
5641 // Prepare inputs. | 5641 // Prepare inputs. |
5642 // | 5642 // |
5643 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); | 5643 TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT); |
5644 CompilationUnit unit = getRequiredInput(UNIT_INPUT); | 5644 CompilationUnit unit = getRequiredInput(UNIT_INPUT); |
5645 AnalysisOptionsImpl options = context.analysisOptions; | 5645 AnalysisOptionsImpl options = context.analysisOptions; |
5646 if (options.strongMode) { | 5646 if (options.strongMode) { |
5647 unit.accept(new CodeChecker( | 5647 unit.accept(new CodeChecker( |
5648 typeProvider, new StrongTypeSystemImpl(), errorListener, | 5648 typeProvider, new StrongTypeSystemImpl(), errorListener, |
5649 hints: options.strongModeHints)); | 5649 options)); |
5650 } | 5650 } |
5651 // | 5651 // |
5652 // Record outputs. | 5652 // Record outputs. |
5653 // | 5653 // |
5654 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); | 5654 outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors); |
5655 outputs[CREATED_RESOLVED_UNIT] = true; | 5655 outputs[CREATED_RESOLVED_UNIT] = true; |
5656 outputs[RESOLVED_UNIT] = unit; | 5656 outputs[RESOLVED_UNIT] = unit; |
5657 } | 5657 } |
5658 | 5658 |
5659 /** | 5659 /** |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5950 | 5950 |
5951 @override | 5951 @override |
5952 bool moveNext() { | 5952 bool moveNext() { |
5953 if (_newSources.isEmpty) { | 5953 if (_newSources.isEmpty) { |
5954 return false; | 5954 return false; |
5955 } | 5955 } |
5956 currentTarget = _newSources.removeLast(); | 5956 currentTarget = _newSources.removeLast(); |
5957 return true; | 5957 return true; |
5958 } | 5958 } |
5959 } | 5959 } |
OLD | NEW |