| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.engine; | 5 library analyzer.src.generated.engine; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 | 10 |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1283 */ | 1283 */ |
| 1284 bool get lint; | 1284 bool get lint; |
| 1285 | 1285 |
| 1286 /** | 1286 /** |
| 1287 * Return a list of the lint rules that are to be run in an analysis context | 1287 * Return a list of the lint rules that are to be run in an analysis context |
| 1288 * if [lint] returns `true`. | 1288 * if [lint] returns `true`. |
| 1289 */ | 1289 */ |
| 1290 List<Linter> get lintRules; | 1290 List<Linter> get lintRules; |
| 1291 | 1291 |
| 1292 /** | 1292 /** |
| 1293 * An informative value for the file path the analysis options were read from. |
| 1294 */ |
| 1295 String get optionsFilePath; |
| 1296 |
| 1297 /** |
| 1293 * A mapping from Dart SDK library name (e.g. "dart:core") to a list of paths | 1298 * A mapping from Dart SDK library name (e.g. "dart:core") to a list of paths |
| 1294 * to patch files that should be applied to the library. | 1299 * to patch files that should be applied to the library. |
| 1295 */ | 1300 */ |
| 1296 Map<String, List<String>> get patchPaths; | 1301 Map<String, List<String>> get patchPaths; |
| 1297 | 1302 |
| 1298 /** | 1303 /** |
| 1299 * Return `true` if analysis is to parse comments. | 1304 * Return `true` if analysis is to parse comments. |
| 1300 */ | 1305 */ |
| 1301 bool get preserveComments; | 1306 bool get preserveComments; |
| 1302 | 1307 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 | 1441 |
| 1437 @override | 1442 @override |
| 1438 bool lint = false; | 1443 bool lint = false; |
| 1439 | 1444 |
| 1440 /** | 1445 /** |
| 1441 * The lint rules that are to be run in an analysis context if [lint] returns | 1446 * The lint rules that are to be run in an analysis context if [lint] returns |
| 1442 * `true`. | 1447 * `true`. |
| 1443 */ | 1448 */ |
| 1444 List<Linter> _lintRules; | 1449 List<Linter> _lintRules; |
| 1445 | 1450 |
| 1451 @override |
| 1452 String optionsFilePath; |
| 1453 |
| 1446 Map<String, List<String>> patchPaths = {}; | 1454 Map<String, List<String>> patchPaths = {}; |
| 1447 | 1455 |
| 1448 @override | 1456 @override |
| 1449 bool preserveComments = true; | 1457 bool preserveComments = true; |
| 1450 | 1458 |
| 1451 @override | 1459 @override |
| 1452 bool strongMode = false; | 1460 bool strongMode = false; |
| 1453 | 1461 |
| 1454 /** | 1462 /** |
| 1455 * A flag indicating whether strong-mode inference hints should be | 1463 * A flag indicating whether strong-mode inference hints should be |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 strongMode = options.strongMode; | 1531 strongMode = options.strongMode; |
| 1524 if (options is AnalysisOptionsImpl) { | 1532 if (options is AnalysisOptionsImpl) { |
| 1525 strongModeHints = options.strongModeHints; | 1533 strongModeHints = options.strongModeHints; |
| 1526 implicitCasts = options.implicitCasts; | 1534 implicitCasts = options.implicitCasts; |
| 1527 nonnullableTypes = options.nonnullableTypes; | 1535 nonnullableTypes = options.nonnullableTypes; |
| 1528 implicitDynamic = options.implicitDynamic; | 1536 implicitDynamic = options.implicitDynamic; |
| 1529 } | 1537 } |
| 1530 trackCacheDependencies = options.trackCacheDependencies; | 1538 trackCacheDependencies = options.trackCacheDependencies; |
| 1531 disableCacheFlushing = options.disableCacheFlushing; | 1539 disableCacheFlushing = options.disableCacheFlushing; |
| 1532 patchPaths = options.patchPaths; | 1540 patchPaths = options.patchPaths; |
| 1541 optionsFilePath = options.optionsFilePath; |
| 1533 } | 1542 } |
| 1534 | 1543 |
| 1535 bool get analyzeFunctionBodies { | 1544 bool get analyzeFunctionBodies { |
| 1536 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { | 1545 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { |
| 1537 return true; | 1546 return true; |
| 1538 } else if (identical( | 1547 } else if (identical( |
| 1539 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { | 1548 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { |
| 1540 return false; | 1549 return false; |
| 1541 } else { | 1550 } else { |
| 1542 throw new StateError('analyzeFunctionBodiesPredicate in use'); | 1551 throw new StateError('analyzeFunctionBodiesPredicate in use'); |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2878 */ | 2887 */ |
| 2879 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; | 2888 bool get wereSourcesAdded => _changeSet.addedSources.length > 0; |
| 2880 | 2889 |
| 2881 /** | 2890 /** |
| 2882 * Return `true` if any sources were removed or deleted. | 2891 * Return `true` if any sources were removed or deleted. |
| 2883 */ | 2892 */ |
| 2884 bool get wereSourcesRemoved => | 2893 bool get wereSourcesRemoved => |
| 2885 _changeSet.removedSources.length > 0 || | 2894 _changeSet.removedSources.length > 0 || |
| 2886 _changeSet.removedContainers.length > 0; | 2895 _changeSet.removedContainers.length > 0; |
| 2887 } | 2896 } |
| OLD | NEW |