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

Unified Diff: pkg/analyzer/lib/options.dart

Issue 1045553002: Implement the new '??' operator in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix if_null_precedence_test for unchecked operation. Created 5 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698