Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3115)

Unified Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 1778683004: CLI support for `enableConditionalDirectives`. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: typos Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 111650e425881dc5b4a966ee153426b193d6f3a4..ec62ce34d8e5643a4014a4182c99baa8d2365498 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -45,6 +45,9 @@ class CommandLineOptions {
/// Whether to display version information
final bool displayVersion;
+ /// Whether to enable conditional directives (DEP 40).
+ final bool enableConditionalDirectives;
+
/// Whether to enable null-aware operators (DEP 9).
final bool enableNullAwareOperators;
@@ -128,6 +131,7 @@ class CommandLineOptions {
analysisOptionsFile = args['options'],
disableHints = args['no-hints'],
displayVersion = args['version'],
+ enableConditionalDirectives = args['enable-conditional-directives'],
enableNullAwareOperators = args['enable-null-aware-operators'],
enableStrictCallChecks = args['enable-strict-call-checks'],
enableSuperMixins = args['supermixin'],
@@ -335,6 +339,11 @@ class CommandLineOptions {
defaultsTo: false,
negatable: false,
hide: true)
+ ..addFlag('enable-conditional-directives',
+ help: 'Enable support for conditional directives (DEP 40).',
+ defaultsTo: false,
+ negatable: false,
+ hide: true)
..addFlag('enable-null-aware-operators',
help: 'Enable support for null-aware operators (DEP 9).',
defaultsTo: false,

Powered by Google App Engine
This is Rietveld 408576698