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

Unified Diff: lib/src/source_visitor.dart

Issue 1252323003: Allow arguments before and after block-formatted functions. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Update pubspec and changelog. 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 | « lib/src/rule/argument.dart ('k') | pubspec.yaml » ('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 3e7c3dca65ff8d832063fbc31e60845416ff8ad9..a59ff5e1d968a17684588025df60868ed6e2beb5 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -1676,6 +1676,10 @@ class SourceVisitor implements AstVisitor {
if (elements.isEmpty && rightBracket.precedingComments == null) {
token(leftBracket);
token(rightBracket);
+
+ // Clear this out in case this empty collection is in an argument list.
+ // We don't want this rule to bleed over to some other collection.
+ _nextLiteralBodyRule = null;
return;
}
« no previous file with comments | « lib/src/rule/argument.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698