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

Unified Diff: lib/src/source_visitor.dart

Issue 792953003: Visit all components of dotted library name. Fixes #109. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 6 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 | « no previous file | test/comments/top_level.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source_visitor.dart
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index cb8da2e063130136627d301e5d6b083caa2b2e45..3f353e92e7f8a3c2efdb68b031501e1dea1f8311 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -808,7 +808,11 @@ class SourceVisitor implements AstVisitor {
}
visitLibraryIdentifier(LibraryIdentifier node) {
- token(node.beginToken);
+ visit(node.components.first);
+ for (var component in node.components.skip(1)) {
+ token(component.beginToken.previous); // "."
+ visit(component);
+ }
}
visitListLiteral(ListLiteral node) {
« no previous file with comments | « no previous file | test/comments/top_level.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698