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

Unified Diff: lib/src/source_visitor.dart

Issue 1257443002: Split before "deferred" if present. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 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
« no previous file with comments | « CHANGELOG.md ('k') | test/regression/0300/0381.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 402842e81b016b2d8b08d836b0c5ca5aa80eae61..4a86da4bf9c02ff563aa0297ee5dcde28c79df5c 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -968,9 +968,14 @@ class SourceVisitor implements AstVisitor {
token(node.keyword);
space();
visit(node.uri);
- token(node.deferredKeyword, before: space);
- token(node.asKeyword, before: soloSplit, after: space);
- visit(node.prefix);
+
+ if (node.asKeyword != null) {
+ soloSplit();
+ token(node.deferredKeyword, after: space);
+ token(node.asKeyword);
+ space();
+ visit(node.prefix);
+ }
builder.startRule(new CombinatorRule());
visitNodes(node.combinators);
« no previous file with comments | « CHANGELOG.md ('k') | test/regression/0300/0381.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698