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 4105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4116 @override | 4116 @override |
4117 void internalPerform() { | 4117 void internalPerform() { |
4118 Source source = getRequiredSource(); | 4118 Source source = getRequiredSource(); |
4119 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); | 4119 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); |
4120 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); | 4120 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); |
4121 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); | 4121 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); |
4122 | 4122 |
4123 RecordingErrorListener errorListener = new RecordingErrorListener(); | 4123 RecordingErrorListener errorListener = new RecordingErrorListener(); |
4124 Parser parser = new Parser(source, errorListener); | 4124 Parser parser = new Parser(source, errorListener); |
4125 AnalysisOptions options = context.analysisOptions; | 4125 AnalysisOptions options = context.analysisOptions; |
| 4126 parser.enableAssertInitializer = options.enableAssertInitializer; |
4126 parser.parseAsync = options.enableAsync; | 4127 parser.parseAsync = options.enableAsync; |
4127 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); | 4128 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); |
4128 parser.parseGenericMethods = options.enableGenericMethods; | 4129 parser.parseGenericMethods = options.enableGenericMethods; |
4129 parser.parseGenericMethodComments = options.strongMode; | 4130 parser.parseGenericMethodComments = options.strongMode; |
4130 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); | 4131 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); |
4131 unit.lineInfo = lineInfo; | 4132 unit.lineInfo = lineInfo; |
4132 | 4133 |
4133 bool hasNonPartOfDirective = false; | 4134 bool hasNonPartOfDirective = false; |
4134 bool hasPartOfDirective = false; | 4135 bool hasPartOfDirective = false; |
4135 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); | 4136 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); |
(...skipping 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6667 | 6668 |
6668 @override | 6669 @override |
6669 bool moveNext() { | 6670 bool moveNext() { |
6670 if (_newSources.isEmpty) { | 6671 if (_newSources.isEmpty) { |
6671 return false; | 6672 return false; |
6672 } | 6673 } |
6673 currentTarget = _newSources.removeLast(); | 6674 currentTarget = _newSources.removeLast(); |
6674 return true; | 6675 return true; |
6675 } | 6676 } |
6676 } | 6677 } |
OLD | NEW |