| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analyzer/context/declared_variables.dart'; | 5 import 'package:analyzer/context/declared_variables.dart'; |
| 6 import 'package:analyzer/dart/ast/ast.dart'; | 6 import 'package:analyzer/dart/ast/ast.dart'; |
| 7 import 'package:analyzer/dart/ast/visitor.dart'; | 7 import 'package:analyzer/dart/ast/visitor.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 8 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/error/error.dart'; | 9 import 'package:analyzer/error/error.dart'; |
| 10 import 'package:analyzer/error/listener.dart'; | 10 import 'package:analyzer/error/listener.dart'; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 265 } |
| 266 | 266 |
| 267 RecordingErrorListener errorListener = _getErrorListener(file); | 267 RecordingErrorListener errorListener = _getErrorListener(file); |
| 268 | 268 |
| 269 if (_analysisOptions.strongMode) { | 269 if (_analysisOptions.strongMode) { |
| 270 AnalysisOptionsImpl options = _analysisOptions as AnalysisOptionsImpl; | 270 AnalysisOptionsImpl options = _analysisOptions as AnalysisOptionsImpl; |
| 271 CodeChecker checker = new CodeChecker( | 271 CodeChecker checker = new CodeChecker( |
| 272 _typeProvider, | 272 _typeProvider, |
| 273 new StrongTypeSystemImpl(_typeProvider, | 273 new StrongTypeSystemImpl(_typeProvider, |
| 274 implicitCasts: options.implicitCasts, | 274 implicitCasts: options.implicitCasts, |
| 275 declarationCasts: options.declarationCasts, |
| 275 nonnullableTypes: options.nonnullableTypes), | 276 nonnullableTypes: options.nonnullableTypes), |
| 276 errorListener, | 277 errorListener, |
| 277 options); | 278 options); |
| 278 checker.visitCompilationUnit(unit); | 279 checker.visitCompilationUnit(unit); |
| 279 } | 280 } |
| 280 | 281 |
| 281 ErrorReporter errorReporter = _getErrorReporter(file); | 282 ErrorReporter errorReporter = _getErrorReporter(file); |
| 282 | 283 |
| 283 // | 284 // |
| 284 // Validate the directives. | 285 // Validate the directives. |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 801 } |
| 801 | 802 |
| 802 /** | 803 /** |
| 803 * Either the name or the source associated with a part-of directive. | 804 * Either the name or the source associated with a part-of directive. |
| 804 */ | 805 */ |
| 805 class _NameOrSource { | 806 class _NameOrSource { |
| 806 final String name; | 807 final String name; |
| 807 final Source source; | 808 final Source source; |
| 808 _NameOrSource(this.name, this.source); | 809 _NameOrSource(this.name, this.source); |
| 809 } | 810 } |
| OLD | NEW |