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

Unified Diff: dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart

Issue 10911298: Parse new library syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update status file after rebasing. Created 8 years, 3 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 | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart
diff --git a/dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart b/dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart
index 24ce9625ffbe30ee7ec4200ee897f35e8f7745fc..4a4da301622ccb4e71e0b0bb4c1ddb11fb38929c 100644
--- a/dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart
+++ b/dart/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart
@@ -492,7 +492,13 @@ class Dart2JsLibraryMirror extends Dart2JsObjectMirror
*/
String get simpleName {
if (_library.libraryTag !== null) {
- return _library.libraryTag.argument.dartString.slowToString();
+ // TODO(ahe): Remove StringNode check when old syntax is removed.
+ StringNode name = _library.libraryTag.name.asStringNode();
+ if (name !== null) {
+ return name.dartString.slowToString();
+ } else {
+ return _library.libraryTag.name.toString();
+ }
} else {
// Use the file name as script name.
String path = _library.uri.path;
« no previous file with comments | « dart/lib/compiler/implementation/tree/nodes.dart ('k') | dart/tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698