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

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 65593002: Fix single library test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// **docgen** is a tool for creating machine readable representations of Dart 5 /// **docgen** is a tool for creating machine readable representations of Dart
6 /// code metadata, including: classes, members, comments and annotations. 6 /// code metadata, including: classes, members, comments and annotations.
7 /// 7 ///
8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files.
9 /// 9 ///
10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR]
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 var classScope = currentClass == null ? 537 var classScope = currentClass == null ?
538 null : lookupFunc(currentClass, name); 538 null : lookupFunc(currentClass, name);
539 if (classScope != null) return docName(classScope); 539 if (classScope != null) return docName(classScope);
540 540
541 var libraryScope = currentLibrary == null ? 541 var libraryScope = currentLibrary == null ?
542 null : lookupFunc(currentLibrary, name); 542 null : lookupFunc(currentLibrary, name);
543 if (libraryScope != null) return docName(libraryScope); 543 if (libraryScope != null) return docName(libraryScope);
544 544
545 // Look in the dart core library scope. 545 // Look in the dart core library scope.
546 var coreScope = lookupFunc(_coreLibrary, name); 546 var coreScope = _coreLibrary == null? null : lookupFunc(_coreLibrary, name);
547 if (coreScope != null) return docName(_coreLibrary); 547 if (coreScope != null) return docName(_coreLibrary);
548 548
549 // If it's a reference that starts with a another library name, then it 549 // If it's a reference that starts with a another library name, then it
550 // looks for a match of that library name in the other sdk libraries. 550 // looks for a match of that library name in the other sdk libraries.
551 if(name.contains('.')) { 551 if(name.contains('.')) {
552 var index = name.indexOf('.'); 552 var index = name.indexOf('.');
553 var libraryName = name.substring(0, index); 553 var libraryName = name.substring(0, index);
554 var remainingName = name.substring(index + 1); 554 var remainingName = name.substring(index + 1);
555 foundLibraryName(library) => library.uri.pathSegments[0] == libraryName; 555 foundLibraryName(library) => library.uri.pathSegments[0] == libraryName;
556 556
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 /// Remove statics from the map of inherited items before adding them. 1367 /// Remove statics from the map of inherited items before adding them.
1368 Map _filterStatics(Map items) { 1368 Map _filterStatics(Map items) {
1369 var result = {}; 1369 var result = {};
1370 items.forEach((name, item) { 1370 items.forEach((name, item) {
1371 if (!item.isStatic) { 1371 if (!item.isStatic) {
1372 result[name] = item; 1372 result[name] = item;
1373 } 1373 }
1374 }); 1374 });
1375 return result; 1375 return result;
1376 } 1376 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698