fmt: fix rare extra tab after a SumType (#8035)
parent
72317975fc
commit
5d6e9f7bf9
|
@ -29,7 +29,6 @@ pub type ScopeObject = ConstField | GlobalField | Var
|
||||||
pub type Node = ConstField | EnumField | Expr | Field | File | GlobalField | IfBranch |
|
pub type Node = ConstField | EnumField | Expr | Field | File | GlobalField | IfBranch |
|
||||||
MatchBranch | ScopeObject | SelectBranch | Stmt | StructField | StructInitField | table.Param
|
MatchBranch | ScopeObject | SelectBranch | Stmt | StructField | StructInitField | table.Param
|
||||||
|
|
||||||
|
|
||||||
pub struct Type {
|
pub struct Type {
|
||||||
pub:
|
pub:
|
||||||
typ table.Type
|
typ table.Type
|
||||||
|
|
|
@ -574,8 +574,10 @@ pub fn (mut f Fmt) type_decl(node ast.TypeDecl) {
|
||||||
if i < sum_type_names.len - 1 {
|
if i < sum_type_names.len - 1 {
|
||||||
f.write(' | ')
|
f.write(' | ')
|
||||||
}
|
}
|
||||||
|
if i < sum_type_names.len - 1 {
|
||||||
f.wrap_long_line(2, true)
|
f.wrap_long_line(2, true)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// f.write(sum_type_names.join(' | '))
|
// f.write(sum_type_names.join(' | '))
|
||||||
comments << node.comments
|
comments << node.comments
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue