Index: pkg/analyzer_cli/lib/src/options.dart |
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart |
index afe83f5582954e70d39f5d6a195b40e52b71366f..338aceeef39ef92c50c737da50280113427c020e 100644 |
--- a/pkg/analyzer_cli/lib/src/options.dart |
+++ b/pkg/analyzer_cli/lib/src/options.dart |
@@ -36,6 +36,10 @@ typedef void ExitHandler(int code); |
class CommandLineOptions { |
final bool enableNewAnalysisDriver = true; |
+ /// Return `true` if the parser is to parse asserts in the initializer list of |
+ /// a constructor. |
+ final bool enableAssertInitializer; |
+ |
/// The path to output analysis results when in build mode. |
final String buildAnalysisOutput; |
@@ -170,6 +174,7 @@ class CommandLineOptions { |
disableHints = args['no-hints'], |
displayVersion = args['version'], |
enableTypeChecks = args['enable_type_checks'], |
+ enableAssertInitializer = args['enable-assert-initializers'], |
hintsAreFatal = args['fatal-hints'], |
ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'], |
lints = args[lintsFlag], |
@@ -468,6 +473,11 @@ class CommandLineOptions { |
defaultsTo: false, |
negatable: false, |
hide: hide) |
+ ..addFlag('enable-assert-initializers', |
+ help: 'Enable parsing of asserts in constructor initializers.', |
+ defaultsTo: false, |
+ negatable: false, |
+ hide: hide) |
..addFlag('use-analysis-driver-memory-byte-store', |
help: 'Use memory byte store, not the file system cache.', |
defaultsTo: false, |