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

Unified Diff: lib/dartdoc/frog/reader.dart

Issue 10696191: Frog removed from dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: lib/dartdoc/frog/reader.dart
diff --git a/lib/dartdoc/frog/reader.dart b/lib/dartdoc/frog/reader.dart
deleted file mode 100644
index b8f4314d6122ddb9d73d44d9ce52f14b76a64df4..0000000000000000000000000000000000000000
--- a/lib/dartdoc/frog/reader.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * An code reader that abstracts away the distinction between internal and user
- * libraries.
- */
-class LibraryReader {
- Map _specialLibs;
- LibraryReader() {
- if (options.config == 'dev') {
- _specialLibs = {
- 'dart:core': joinPaths(options.libDir,
- 'dartdoc/frog/lib/corelib.dart'),
- 'dart:coreimpl': joinPaths(options.libDir,
- 'dartdoc/frog/lib/corelib_impl.dart'),
- 'dart:html': joinPaths(options.libDir,
- 'dartdoc/frog/lib/html_frog.dart'),
- 'dart:dom_deprecated': joinPaths(options.libDir,
- 'dom/frog/dom_frog.dart'),
- 'dart:crypto': joinPaths(options.libDir,
- 'crypto/crypto.dart'),
- 'dart:json': joinPaths(options.libDir,
- 'json/json_frog.dart'),
- 'dart:io': joinPaths(options.libDir,
- 'compiler/implementation/lib/io.dart'),
- 'dart:isolate': joinPaths(options.libDir,
- 'isolate/isolate_frog.dart'),
- 'dart:uri': joinPaths(options.libDir,
- 'uri/uri.dart'),
- 'dart:utf': joinPaths(options.libDir,
- 'utf/utf.dart'),
- 'dart:web': joinPaths(options.libDir,
- 'web/web.dart'),
- };
- } else if (options.config == 'sdk') {
- _specialLibs = {
- 'dart:core': joinPaths(options.libDir,
- 'dartdoc/frog/lib/corelib.dart'),
- 'dart:coreimpl': joinPaths(options.libDir,
- 'dartdoc/frog/lib/corelib_impl.dart'),
- 'dart:html': joinPaths(options.libDir,
- 'dartdoc/frog/lib/html_frog.dart'),
- 'dart:dom_deprecated': joinPaths(options.libDir,
- 'dom/dom_frog.dart'),
- // TODO(rnystrom): How should we handle dart:io here?
- 'dart:isolate': joinPaths(options.libDir,
- 'isolate/isolate_frog.dart'),
- 'dart:crypto': joinPaths(options.libDir,
- 'crypto/crypto.dart'),
- 'dart:json': joinPaths(options.libDir,
- 'json/json_frog.dart'),
- 'dart:uri': joinPaths(options.libDir,
- 'uri/uri.dart'),
- 'dart:utf': joinPaths(options.libDir,
- 'utf/utf.dart'),
- 'dart:web': joinPaths(options.libDir,
- 'web/web.dart'),
- };
- } else {
- world.error('Invalid configuration ${options.config}');
- }
- }
-
- SourceFile readFile(String fullName) {
- String filename;
-
-
- if (fullName.startsWith('package:')) {
- String name = fullName.substring('package:'.length);
- if (options.packageRoot !== null) {
- filename = joinPaths(options.packageRoot, name);
- } else {
- filename = joinPaths(dirname(options.dartScript),
- joinPaths('packages', name));
- }
- } else {
- filename = _specialLibs[fullName];
- }
-
- if (filename == null) {
- filename = fullName;
- }
-
- if (world.files.fileExists(filename)) {
- // TODO(jimhug): Should we cache these based on time stamps here?
- return new SourceFile(filename, world.files.readAll(filename));
- } else {
- world.error('File not found: $filename', null);
- return new SourceFile(filename, '');
- }
- }
-}
« no previous file with comments | « lib/dartdoc/frog/parser.dart ('k') | lib/dartdoc/frog/source.dart » ('j') | tools/create_sdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698