Index: pkg/analyzer/lib/options.dart |
diff --git a/pkg/analyzer/lib/options.dart b/pkg/analyzer/lib/options.dart |
index 1f7543e1c1c202e623d30935326eabf2717b8309..06aaa8449b8441bc68881937bee9a26d8a36f36c 100644 |
--- a/pkg/analyzer/lib/options.dart |
+++ b/pkg/analyzer/lib/options.dart |
@@ -27,6 +27,11 @@ class CommandLineOptions { |
final bool displayVersion; |
/** |
+ * Whether to enable null-aware operators (DEP 9). |
+ */ |
+ final bool enableNullAwareOperators; |
+ |
+ /** |
* Whether to strictly follow the specification when generating warnings on |
* "call" methods (fixes dartbug.com/21938). |
*/ |
@@ -86,6 +91,7 @@ class CommandLineOptions { |
this.definedVariables = definedVariables, |
disableHints = args['no-hints'], |
displayVersion = args['version'], |
+ enableNullAwareOperators = args['enable-null-aware-operators'], |
enableStrictCallChecks = args['enable-strict-call-checks'], |
enableTypeChecks = args['enable_type_checks'], |
ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], |
@@ -213,6 +219,11 @@ class CommandLineOptions { |
defaultsTo: false, |
negatable: false, |
hide: true) |
+ ..addFlag('enable-null-aware-operators', |
+ help: 'Enable support for null-aware operators (DEP 9)', |
+ defaultsTo: false, |
+ negatable: false, |
+ hide: true) |
..addFlag('enable-strict-call-checks', |
help: 'Fix issue 21938', |
defaultsTo: false, |