OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_impl; | 5 library analyzer_impl; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 | 10 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 declaredVariables.define(variableName, value); | 204 declaredVariables.define(variableName, value); |
205 }); | 205 }); |
206 } | 206 } |
207 // Uncomment the following to have errors reported on stdout and stderr | 207 // Uncomment the following to have errors reported on stdout and stderr |
208 AnalysisEngine.instance.logger = new StdLogger(options.log); | 208 AnalysisEngine.instance.logger = new StdLogger(options.log); |
209 | 209 |
210 // set options for context | 210 // set options for context |
211 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); | 211 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); |
212 contextOptions.cacheSize = _MAX_CACHE_SIZE; | 212 contextOptions.cacheSize = _MAX_CACHE_SIZE; |
213 contextOptions.hint = !options.disableHints; | 213 contextOptions.hint = !options.disableHints; |
| 214 contextOptions.enableNullAwareOperators = options.enableNullAwareOperators; |
214 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; | 215 contextOptions.enableStrictCallChecks = options.enableStrictCallChecks; |
215 contextOptions.analyzeFunctionBodiesPredicate = | 216 contextOptions.analyzeFunctionBodiesPredicate = |
216 _analyzeFunctionBodiesPredicate; | 217 _analyzeFunctionBodiesPredicate; |
217 contextOptions.generateImplicitErrors = options.showPackageWarnings; | 218 contextOptions.generateImplicitErrors = options.showPackageWarnings; |
218 contextOptions.generateSdkErrors = options.showSdkWarnings; | 219 contextOptions.generateSdkErrors = options.showSdkWarnings; |
219 context.analysisOptions = contextOptions; | 220 context.analysisOptions = contextOptions; |
220 | 221 |
221 librarySource = computeLibrarySource(); | 222 librarySource = computeLibrarySource(); |
222 | 223 |
223 Uri libraryUri = librarySource.uri; | 224 Uri libraryUri = librarySource.uri; |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 } | 489 } |
489 } | 490 } |
490 | 491 |
491 @override | 492 @override |
492 void logInformation2(String message, Object exception) { | 493 void logInformation2(String message, Object exception) { |
493 if (log) { | 494 if (log) { |
494 stdout.writeln(message); | 495 stdout.writeln(message); |
495 } | 496 } |
496 } | 497 } |
497 } | 498 } |
OLD | NEW |