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

Unified Diff: lib/src/argument_list_visitor.dart

Issue 1182953003: Eat some dogfood! (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 6 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
Index: lib/src/argument_list_visitor.dart
diff --git a/lib/src/argument_list_visitor.dart b/lib/src/argument_list_visitor.dart
index 0bff26af1ffbacb81c6c2fb6242e2de887b5cbaf..61e820b621ff1f387b43add6157d1d613760ae84 100644
--- a/lib/src/argument_list_visitor.dart
+++ b/lib/src/argument_list_visitor.dart
@@ -47,6 +47,7 @@ class ArgumentListVisitor {
return _blockRule;
}
+
Rule _blockRule;
/// Returns `true` if there is only a single positional argument.
@@ -75,8 +76,8 @@ class ArgumentListVisitor {
factory ArgumentListVisitor(SourceVisitor visitor, ArgumentList node) {
// Assumes named arguments follow all positional ones.
- var positional = node.arguments
- .takeWhile((arg) => arg is! NamedExpression).toList();
+ var positional =
+ node.arguments.takeWhile((arg) => arg is! NamedExpression).toList();
var named = node.arguments.skip(positional.length).toList();
var blocks = node.arguments.where(_isBlockArgument).toSet();
@@ -208,8 +209,8 @@ class ArgumentListVisitor {
}
// Split before the first named argument.
- namedRule.beforeArguments(
- _visitor.builder.split(space: _positional.isNotEmpty));
+ namedRule
+ .beforeArguments(_visitor.builder.split(space: _positional.isNotEmpty));
for (var argument in _named) {
_writeArgument(namedRule, argument);
« no previous file with comments | « bin/format.dart ('k') | lib/src/call_chain_visitor.dart » ('j') | lib/src/source_visitor.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698