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

Unified Diff: pkg/dev_compiler/lib/src/compiler/command.dart

Issue 2578463004: update DDC to use analyzer extractDefinedVariables (Closed)
Patch Set: merge Created 4 years 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/dev_compiler/lib/src/analyzer/context.dart ('k') | pkg/dev_compiler/test/codegen_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/command.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/command.dart b/pkg/dev_compiler/lib/src/compiler/command.dart
index fb6a29a96209499401e0915ffb3fdf3448e2e778..8a4f92ab6fab09e7431a135ac7caa355b3f2c6ca 100644
--- a/pkg/dev_compiler/lib/src/compiler/command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/command.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:io';
+import 'package:analyzer/src/command_line/arguments.dart'
+ show extractDefinedVariables;
import 'package:analyzer/src/generated/source.dart' show Source;
import 'package:analyzer/src/summary/package_bundle_reader.dart'
show InSummarySource;
@@ -10,7 +12,7 @@ import 'package:args/args.dart' show ArgParser, ArgResults;
import 'package:args/command_runner.dart' show UsageException;
import 'package:path/path.dart' as path;
-import '../analyzer/context.dart' show AnalyzerOptions, parseDeclaredVariables;
+import '../analyzer/context.dart' show AnalyzerOptions;
import 'compiler.dart' show BuildUnit, CompilerOptions, ModuleCompiler;
import 'module_builder.dart';
@@ -26,7 +28,8 @@ int compile(List<String> args, {void printFn(Object obj)}) {
ArgResults argResults;
var declaredVars = <String, String>{};
try {
- argResults = _argParser().parse(parseDeclaredVariables(args, declaredVars));
+ args = extractDefinedVariables(args, declaredVars);
+ argResults = _argParser().parse(args);
_verbose = argResults['verbose'];
} on FormatException catch (error) {
printFn('$error\n\n$_usageMessage');
« no previous file with comments | « pkg/dev_compiler/lib/src/analyzer/context.dart ('k') | pkg/dev_compiler/test/codegen_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698