blob: 062e26895a0ea02b695754fb927523cee0324eeb [file] [log] [blame]
40 columns |
>>> indentation
extension A on B {
var z;
inc(int x) => ++x;
foo(int x) {
if (x == 0) {
return true;
}}}
<<<
extension A on B {
var z;
inc(int x) => ++x;
foo(int x) {
if (x == 0) {
return true;
}
}
}
>>> trailing space inside body
extension A on B {
}
<<<
extension A on B {}
>>> leading space before "extension"
extension A on B {
}
<<<
extension A on B {}
>>>
extension A on B { int meaningOfLife() => 42; }
<<<
extension A on B {
int meaningOfLife() => 42;
}
>>>
extension A on B {
}
<<<
extension A on B {}
>>>
extension A on B{var z;inc(int x) => ++x;}
<<<
extension A on B {
var z;
inc(int x) => ++x;
}
>>> eats newlines
extension
A
on
B
{}
<<<
extension A on B {}
>>> require blank line after non-empty block-bodied members
extension A on B {
var a = 1; b() {;} c() => null; get d {;} get e => null; set f(value) {;
} set g(value) => null; var h = 1;}
<<<
extension A on B {
var a = 1;
b() {
;
}
c() => null;
get d {
;
}
get e => null;
set f(value) {
;
}
set g(value) => null;
var h = 1;
}
>>> no required blank line after empty block-bodied members
extension A on B {
var a = 1; b() {} c() => null; get d {} get e => null; set f(value) {
} set g(value) => null; var h = 1;}
<<<
extension A on B {
var a = 1;
b() {}
c() => null;
get d {}
get e => null;
set f(value) {}
set g(value) => null;
var h = 1;
}