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

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

Issue 1570183002: add parser parseAsync flag (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 years, 11 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 | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index ebc5a4c2344cbc35fa9d6734d5ac16f120b6bcbf..6775408ba659b07e5ccbc77818d29682727c5271 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -39,6 +39,7 @@ void configureContextOptions(
/// `analyzer` analysis options constants.
class AnalyzerOptions {
static const String analyzer = 'analyzer';
+ static const String enableAsync = 'enableAsync';
static const String enableGenericMethods = 'enableGenericMethods';
static const String enableSuperMixins = 'enableSuperMixins';
static const String errors = 'errors';
@@ -71,6 +72,7 @@ class AnalyzerOptions {
/// Supported `analyzer` language configuration options.
static const List<String> languageOptions = const [
+ enableAsync,
enableGenericMethods,
enableSuperMixins
];
@@ -425,6 +427,14 @@ class _OptionsProcessor {
void setLanguageOption(
AnalysisContext context, Object feature, Object value) {
+ if (feature == AnalyzerOptions.enableAsync) {
+ if (isFalse(value)) {
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.enableAsync = false;
+ context.analysisOptions = options;
+ }
+ }
if (feature == AnalyzerOptions.enableSuperMixins) {
if (isTrue(value)) {
AnalysisOptionsImpl options =
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698