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/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2907 TaskDescriptor get descriptor => DESCRIPTOR; | 2907 TaskDescriptor get descriptor => DESCRIPTOR; |
2908 | 2908 |
2909 @override | 2909 @override |
2910 void internalPerform() { | 2910 void internalPerform() { |
2911 Source source = getRequiredSource(); | 2911 Source source = getRequiredSource(); |
2912 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); | 2912 LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME); |
2913 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); | 2913 int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME); |
2914 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); | 2914 Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME); |
2915 | 2915 |
2916 RecordingErrorListener errorListener = new RecordingErrorListener(); | 2916 RecordingErrorListener errorListener = new RecordingErrorListener(); |
2917 Parser parser = new Parser(source, errorListener); | 2917 Parser parser = new Parser(source, errorListener, |
| 2918 enableAssertMessage: context.analysisOptions.enableAssertMessage); |
2918 AnalysisOptions options = context.analysisOptions; | 2919 AnalysisOptions options = context.analysisOptions; |
2919 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); | 2920 parser.parseFunctionBodies = options.analyzeFunctionBodiesPredicate(source); |
2920 parser.parseGenericMethods = options.enableGenericMethods; | 2921 parser.parseGenericMethods = options.enableGenericMethods; |
2921 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); | 2922 CompilationUnit unit = parser.parseCompilationUnit(tokenStream); |
2922 unit.lineInfo = lineInfo; | 2923 unit.lineInfo = lineInfo; |
2923 | 2924 |
2924 bool hasNonPartOfDirective = false; | 2925 bool hasNonPartOfDirective = false; |
2925 bool hasPartOfDirective = false; | 2926 bool hasPartOfDirective = false; |
2926 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); | 2927 HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>(); |
2927 HashSet<Source> exportedSourceSet = new HashSet<Source>(); | 2928 HashSet<Source> exportedSourceSet = new HashSet<Source>(); |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4042 | 4043 |
4043 @override | 4044 @override |
4044 bool moveNext() { | 4045 bool moveNext() { |
4045 if (_newSources.isEmpty) { | 4046 if (_newSources.isEmpty) { |
4046 return false; | 4047 return false; |
4047 } | 4048 } |
4048 currentTarget = _newSources.removeLast(); | 4049 currentTarget = _newSources.removeLast(); |
4049 return true; | 4050 return true; |
4050 } | 4051 } |
4051 } | 4052 } |
OLD | NEW |