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 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4013 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); | 4013 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); |
4014 | 4014 |
4015 RecordingErrorListener errorListener = new RecordingErrorListener(); | 4015 RecordingErrorListener errorListener = new RecordingErrorListener(); |
4016 _errorReporter = new ErrorReporter(errorListener, _source); | 4016 _errorReporter = new ErrorReporter(errorListener, _source); |
4017 | 4017 |
4018 Parser parser = new Parser(_source, errorListener); | 4018 Parser parser = new Parser(_source, errorListener); |
4019 AnalysisOptions options = context.analysisOptions; | 4019 AnalysisOptions options = context.analysisOptions; |
4020 parser.enableAssertInitializer = options.enableAssertInitializer; | 4020 parser.enableAssertInitializer = options.enableAssertInitializer; |
4021 parser.parseFunctionBodies = | 4021 parser.parseFunctionBodies = |
4022 options.analyzeFunctionBodiesPredicate(_source); | 4022 options.analyzeFunctionBodiesPredicate(_source); |
4023 parser.parseGenericMethods = options.enableGenericMethods; | |
4024 parser.parseGenericMethodComments = options.strongMode; | 4023 parser.parseGenericMethodComments = options.strongMode; |
4025 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); | 4024 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); |
4026 unit.lineInfo = lineInfo; | 4025 unit.lineInfo = lineInfo; |
4027 | 4026 |
4028 if (options.patchPlatform != 0 && _source.uri.scheme == 'dart') { | 4027 if (options.patchPlatform != 0 && _source.uri.scheme == 'dart') { |
4029 new SdkPatcher().patch(context.sourceFactory.dartSdk, | 4028 new SdkPatcher().patch(context.sourceFactory.dartSdk, |
4030 options.patchPlatform, errorListener, _source, unit); | 4029 options.patchPlatform, errorListener, _source, unit); |
4031 } | 4030 } |
4032 | 4031 |
4033 bool hasNonPartOfDirective = false; | 4032 bool hasNonPartOfDirective = false; |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6450 | 6449 |
6451 @override | 6450 @override |
6452 bool moveNext() { | 6451 bool moveNext() { |
6453 if (_newSources.isEmpty) { | 6452 if (_newSources.isEmpty) { |
6454 return false; | 6453 return false; |
6455 } | 6454 } |
6456 currentTarget = _newSources.removeLast(); | 6455 currentTarget = _newSources.removeLast(); |
6457 return true; | 6456 return true; |
6458 } | 6457 } |
6459 } | 6458 } |
OLD | NEW |