Reformat and update CHANGELOG.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebb360b..9265c5e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,8 @@
* Add `--fix-single-cascade-statements`.
* Correctly handle `var` in `--fix-function-typedefs` (#826).
* Preserve leading indentation in fixed doc comments (#821).
-* Add `--verbose` to hide advanced options in `--help` output
+* Add `--verbose` to hide advanced options in `--help` output.
+* Split outer nested control flow elements (#869).
# 1.3.3
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index 9b3f18b..caeffe9 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -1303,7 +1303,7 @@
} else {
throw UnsupportedError(
'--fix-single-cascade-statements: subexpression of cascade '
- '"$cascade" has unsupported type ${subexpression.runtimeType}.');
+ '"$cascade" has unsupported type ${subexpression.runtimeType}.');
}
token(statement.semicolon);
@@ -1455,7 +1455,7 @@
.where((param) => param is! DefaultFormalParameter)
.toList();
var optionalParams =
- node.parameters.whereType<DefaultFormalParameter>().toList();
+ node.parameters.whereType<DefaultFormalParameter>().toList();
if (nestExpression) builder.nestExpression();
token(node.leftParenthesis);
@@ -1829,8 +1829,8 @@
// unnecessarily indent each subsequent section of the chain.
var ifElements = [
for (CollectionElement thisNode = node;
- thisNode is IfElement;
- thisNode = (thisNode as IfElement).elseElement)
+ thisNode is IfElement;
+ thisNode = (thisNode as IfElement).elseElement)
thisNode as IfElement
];
@@ -1869,7 +1869,7 @@
}
var elseSpreadBracket =
- _findSpreadCollectionBracket(ifElements.last.elseElement);
+ _findSpreadCollectionBracket(ifElements.last.elseElement);
if (elseSpreadBracket != null) {
spreadBrackets[ifElements.last.elseElement] = elseSpreadBracket;
beforeBlock(elseSpreadBracket, spreadRule, null);
@@ -3043,8 +3043,8 @@
/// and followed by the given functions.
void visitNodes(Iterable<AstNode> nodes,
{void Function() before,
- void Function() between,
- void Function() after}) {
+ void Function() between,
+ void Function() after}) {
if (nodes == null || nodes.isEmpty) return;
if (before != null) before();
@@ -3565,7 +3565,7 @@
/// [FunctionExpression].
bool _isInLambda(AstNode node) =>
node.parent is FunctionExpression &&
- node.parent.parent is! FunctionDeclaration;
+ node.parent.parent is! FunctionDeclaration;
/// Writes the string literal [string] to the output.
///