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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 | 1303 |
1304 /** | 1304 /** |
1305 * A flag indicating whether implicit casts are allowed in [strongMode] | 1305 * A flag indicating whether implicit casts are allowed in [strongMode] |
1306 * (they are always allowed in Dart 1.0 mode). | 1306 * (they are always allowed in Dart 1.0 mode). |
1307 * | 1307 * |
1308 * This option is experimental and subject to change. | 1308 * This option is experimental and subject to change. |
1309 */ | 1309 */ |
1310 bool implicitCasts = true; | 1310 bool implicitCasts = true; |
1311 | 1311 |
1312 /** | 1312 /** |
| 1313 * A flag indicating whether implicit dynamic type is allowed, on by default. |
| 1314 * |
| 1315 * This flag can be used without necessarily enabling [strongMode], but it is |
| 1316 * designed with strong mode's type inference in mind. Without type inference, |
| 1317 * it will raise many errors. Also it does not provide type safety without |
| 1318 * strong mode. |
| 1319 * |
| 1320 * This option is experimental and subject to change. |
| 1321 */ |
| 1322 bool implicitDynamic = true; |
| 1323 |
| 1324 /** |
1313 * Initialize a newly created set of analysis options to have their default | 1325 * Initialize a newly created set of analysis options to have their default |
1314 * values. | 1326 * values. |
1315 */ | 1327 */ |
1316 AnalysisOptionsImpl(); | 1328 AnalysisOptionsImpl(); |
1317 | 1329 |
1318 /** | 1330 /** |
1319 * Initialize a newly created set of analysis options to have the same values | 1331 * Initialize a newly created set of analysis options to have the same values |
1320 * as those in the given set of analysis [options]. | 1332 * as those in the given set of analysis [options]. |
1321 */ | 1333 */ |
1322 AnalysisOptionsImpl.from(AnalysisOptions options) { | 1334 AnalysisOptionsImpl.from(AnalysisOptions options) { |
(...skipping 11 matching lines...) Expand all Loading... |
1334 hint = options.hint; | 1346 hint = options.hint; |
1335 incremental = options.incremental; | 1347 incremental = options.incremental; |
1336 incrementalApi = options.incrementalApi; | 1348 incrementalApi = options.incrementalApi; |
1337 incrementalValidation = options.incrementalValidation; | 1349 incrementalValidation = options.incrementalValidation; |
1338 lint = options.lint; | 1350 lint = options.lint; |
1339 preserveComments = options.preserveComments; | 1351 preserveComments = options.preserveComments; |
1340 strongMode = options.strongMode; | 1352 strongMode = options.strongMode; |
1341 if (options is AnalysisOptionsImpl) { | 1353 if (options is AnalysisOptionsImpl) { |
1342 strongModeHints = options.strongModeHints; | 1354 strongModeHints = options.strongModeHints; |
1343 implicitCasts = options.implicitCasts; | 1355 implicitCasts = options.implicitCasts; |
| 1356 implicitDynamic = options.implicitDynamic; |
1344 } | 1357 } |
1345 trackCacheDependencies = options.trackCacheDependencies; | 1358 trackCacheDependencies = options.trackCacheDependencies; |
1346 } | 1359 } |
1347 | 1360 |
1348 bool get analyzeFunctionBodies { | 1361 bool get analyzeFunctionBodies { |
1349 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { | 1362 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { |
1350 return true; | 1363 return true; |
1351 } else if (identical( | 1364 } else if (identical( |
1352 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { | 1365 analyzeFunctionBodiesPredicate, _analyzeNoFunctionBodies)) { |
1353 return false; | 1366 return false; |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2594 * The data that was created from the source. | 2607 * The data that was created from the source. |
2595 */ | 2608 */ |
2596 final E data; | 2609 final E data; |
2597 | 2610 |
2598 /** | 2611 /** |
2599 * Initialize a newly created holder to associate the given [data] with the | 2612 * Initialize a newly created holder to associate the given [data] with the |
2600 * given [modificationTime]. | 2613 * given [modificationTime]. |
2601 */ | 2614 */ |
2602 TimestampedData(this.modificationTime, this.data); | 2615 TimestampedData(this.modificationTime, this.data); |
2603 } | 2616 } |
OLD | NEW |