File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ class AstNodeVisitor extends ThrowingAstVisitor<void> with PieceFactory {
95
95
sequence.visit (directive);
96
96
}
97
97
98
+ // Add a blank line between directives and declarations.
99
+ sequence.addBlank ();
100
+
98
101
for (var declaration in node.declarations) {
99
102
var hasBody = declaration is ClassDeclaration ||
100
103
declaration is EnumDeclaration ||
@@ -312,7 +315,7 @@ class AstNodeVisitor extends ThrowingAstVisitor<void> with PieceFactory {
312
315
@override
313
316
void visitCompilationUnit (CompilationUnit node) {
314
317
throw UnsupportedError (
315
- 'CompilationUnit should be handled directly by format ().' );
318
+ 'CompilationUnit should be handled directly by run ().' );
316
319
}
317
320
318
321
@override
Original file line number Diff line number Diff line change 7
7
Expect.equals(42, y(l[1]));
8
8
}
9
9
<<<
10
- ### TODO(1470): Should insert blank line after import.
11
10
import "package:expect/expect.dart";
11
+
12
12
int Function() x = () => 42;
13
13
int Function(int Function()) y = (int Function() x) => x();
14
14
List<int Function()> l = <int Function()>[() => 42, x];
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import 'dart:io';
7
7
#!/usr/bin/env dart
8
8
9
9
import 'dart:io';
10
+
10
11
// More code...
11
12
>>>
12
13
#!/usr/bin/env dart
You can’t perform that action at this time.
0 commit comments