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

Unified Diff: pkg/docgen/lib/src/dart2js_mirrors.dart

Issue 16948010: added Command Line Arguments, support for directories, hiding private data, not parsing the SDK, rem (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/docgen/lib/src/dart2js_mirrors.dart
diff --git a/pkg/docgen/lib/src/dart2js_mirrors.dart b/pkg/docgen/lib/src/dart2js_mirrors.dart
index cee8fbed990564a204e4669f7b46d2f760cbb065..8001c5a8f809116ba43c31a3593878336843a720 100644
--- a/pkg/docgen/lib/src/dart2js_mirrors.dart
+++ b/pkg/docgen/lib/src/dart2js_mirrors.dart
@@ -11,43 +11,16 @@ library dart2js_util;
import 'dart:async' show Future;
import 'dart:io' show Path;
-import '../../../../sdk/lib/_internal/compiler/compiler.dart' as api;
-import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart'
+import 'package:compiler_unsupported/compiler.dart' as api;
+import 'package:compiler_unsupported/implementation/mirrors/dart2js_mirror.dart'
as dart2js show analyze, Dart2JsMirrorSystem;
-import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
+import 'package:compiler_unsupported/implementation/mirrors/mirrors.dart'
show MirrorSystem;
-import '../../../../sdk/lib/_internal/compiler/implementation/source_file_provider.dart'
+import 'package:compiler_unsupported/implementation/source_file_provider.dart'
show FormattingDiagnosticHandler, SourceFileProvider;
-import '../../../../sdk/lib/_internal/compiler/implementation/filenames.dart'
+import 'package:compiler_unsupported/implementation/filenames.dart'
show appendSlash, currentDirectory;
-// TODO(johnniwinther): Support client configurable providers.
-
-/**
- * Returns a future that completes to a non-null String when [script]
- * has been successfully compiled.
- */
-// TODO(amouravski): Remove this method and call dart2js via a process instead.
-Future<String> compile(Path script,
- Path libraryRoot,
- {Path packageRoot,
- List<String> options: const <String>[],
- api.DiagnosticHandler diagnosticHandler}) {
- SourceFileProvider provider = new SourceFileProvider();
- if (diagnosticHandler == null) {
- diagnosticHandler =
- new FormattingDiagnosticHandler(provider).diagnosticHandler;
- }
- Uri scriptUri = currentDirectory.resolve(script.toString());
- Uri libraryUri = currentDirectory.resolve(appendSlash('$libraryRoot'));
- Uri packageUri = null;
- if (packageRoot != null) {
- packageUri = currentDirectory.resolve(appendSlash('$packageRoot'));
- }
- return api.compile(scriptUri, libraryUri, packageUri,
- provider.readStringFromUri, diagnosticHandler, options);
-}
-
/**
* Analyzes set of libraries and provides a mirror system which can be used for
* static inspection of the source code.

Powered by Google App Engine
This is Rietveld 408576698