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 4029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4040 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); | 4040 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); |
4041 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); | 4041 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); |
4042 | 4042 |
4043 RecordingErrorListener errorListener = new RecordingErrorListener(); | 4043 RecordingErrorListener errorListener = new RecordingErrorListener(); |
4044 Parser parser = new Parser(source, errorListener); | 4044 Parser parser = new Parser(source, errorListener); |
4045 AnalysisOptions options = context.analysisOptions; | 4045 AnalysisOptions options = context.analysisOptions; |
4046 parser.parseAsync = options.enableAsync; | 4046 parser.parseAsync = options.enableAsync; |
4047 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); | 4047 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); |
4048 parser.parseGenericMethods = options.enableGenericMethods; | 4048 parser.parseGenericMethods = options.enableGenericMethods; |
4049 parser.parseGenericMethodComments = options.strongMode; | 4049 parser.parseGenericMethodComments = options.strongMode; |
4050 parser.parseTrailingCommas = options.enableTrailingCommas; | |
4051 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); | 4050 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); |
4052 unit.lineInfo = lineInfo; | 4051 unit.lineInfo = lineInfo; |
4053 | 4052 |
4054 bool hasNonPartOfDirective = false; | 4053 bool hasNonPartOfDirective = false; |
4055 bool hasPartOfDirective = false; | 4054 bool hasPartOfDirective = false; |
4056 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); | 4055 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); |
4057 HashSet<Source> exportedSourceSet = new HashSet<Source>(); | 4056 HashSet<Source> exportedSourceSet = new HashSet<Source>(); |
4058 HashSet<Source> includedSourceSet = new HashSet<Source>(); | 4057 HashSet<Source> includedSourceSet = new HashSet<Source>(); |
4059 NodeList<Directive> directives = unit.directives; | 4058 NodeList<Directive> directives = unit.directives; |
4060 int length = directives.length; | 4059 int length = directives.length; |
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6519 | 6518 |
6520 @override | 6519 @override |
6521 bool moveNext() { | 6520 bool moveNext() { |
6522 if (_newSources.isEmpty) { | 6521 if (_newSources.isEmpty) { |
6523 return false; | 6522 return false; |
6524 } | 6523 } |
6525 currentTarget = _newSources.removeLast(); | 6524 currentTarget = _newSources.removeLast(); |
6526 return true; | 6525 return true; |
6527 } | 6526 } |
6528 } | 6527 } |
OLD | NEW |