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 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 | 1277 |
1278 /** | 1278 /** |
1279 * A flag indicating whether strong-mode inference hints should be | 1279 * A flag indicating whether strong-mode inference hints should be |
1280 * used. This flag is not exposed in the interface, and should be | 1280 * used. This flag is not exposed in the interface, and should be |
1281 * replaced by something more general. | 1281 * replaced by something more general. |
1282 */ | 1282 */ |
1283 // TODO(leafp): replace this with something more general | 1283 // TODO(leafp): replace this with something more general |
1284 bool strongModeHints = false; | 1284 bool strongModeHints = false; |
1285 | 1285 |
1286 /** | 1286 /** |
| 1287 * A flag indicating whether implicit casts are allowed in [strongMode] |
| 1288 * (they are always allowed in Dart 1.0 mode). |
| 1289 * |
| 1290 * This option is experimental and subject to change. |
| 1291 */ |
| 1292 bool implicitCasts = true; |
| 1293 |
| 1294 /** |
1287 * Initialize a newly created set of analysis options to have their default | 1295 * Initialize a newly created set of analysis options to have their default |
1288 * values. | 1296 * values. |
1289 */ | 1297 */ |
1290 AnalysisOptionsImpl(); | 1298 AnalysisOptionsImpl(); |
1291 | 1299 |
1292 /** | 1300 /** |
1293 * Initialize a newly created set of analysis options to have the same values | 1301 * Initialize a newly created set of analysis options to have the same values |
1294 * as those in the given set of analysis [options]. | 1302 * as those in the given set of analysis [options]. |
1295 */ | 1303 */ |
1296 AnalysisOptionsImpl.from(AnalysisOptions options) { | 1304 AnalysisOptionsImpl.from(AnalysisOptions options) { |
(...skipping 10 matching lines...) Expand all Loading... |
1307 generateSdkErrors = options.generateSdkErrors; | 1315 generateSdkErrors = options.generateSdkErrors; |
1308 hint = options.hint; | 1316 hint = options.hint; |
1309 incremental = options.incremental; | 1317 incremental = options.incremental; |
1310 incrementalApi = options.incrementalApi; | 1318 incrementalApi = options.incrementalApi; |
1311 incrementalValidation = options.incrementalValidation; | 1319 incrementalValidation = options.incrementalValidation; |
1312 lint = options.lint; | 1320 lint = options.lint; |
1313 preserveComments = options.preserveComments; | 1321 preserveComments = options.preserveComments; |
1314 strongMode = options.strongMode; | 1322 strongMode = options.strongMode; |
1315 if (options is AnalysisOptionsImpl) { | 1323 if (options is AnalysisOptionsImpl) { |
1316 strongModeHints = options.strongModeHints; | 1324 strongModeHints = options.strongModeHints; |
| 1325 implicitCasts = options.implicitCasts; |
1317 } | 1326 } |
1318 } | 1327 } |
1319 | 1328 |
1320 bool get analyzeFunctionBodies { | 1329 bool get analyzeFunctionBodies { |
1321 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { | 1330 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { |
1322 return true; | 1331 return true; |
1323 } else if (identical( | 1332 } else if (identical( |
1324 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { | 1333 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { |
1325 return false; | 1334 return false; |
1326 } else { | 1335 } else { |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 * The data that was created from the source. | 2572 * The data that was created from the source. |
2564 */ | 2573 */ |
2565 final E data; | 2574 final E data; |
2566 | 2575 |
2567 /** | 2576 /** |
2568 * Initialize a newly created holder to associate the given [data] with the | 2577 * Initialize a newly created holder to associate the given [data] with the |
2569 * given [modificationTime]. | 2578 * given [modificationTime]. |
2570 */ | 2579 */ |
2571 TimestampedData(this.modificationTime, this.data); | 2580 TimestampedData(this.modificationTime, this.data); |
2572 } | 2581 } |
OLD | NEW |