Introduce Token element (#7048)

This commit is contained in:
Micha Reiser
2023-09-02 10:05:47 +02:00
committed by GitHub
parent 2f3a950f6f
commit c05e4628b1
78 changed files with 733 additions and 723 deletions

View File

@@ -30,7 +30,7 @@ impl FormatNodeRule<StmtIf> for FormatStmtIf {
ClauseHeader::If(item),
trailing_colon_comment,
&format_args![
text("if"),
token("if"),
space(),
maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks),
],
@@ -86,13 +86,13 @@ pub(crate) fn format_elif_else_clause(
write!(
f,
[
text("elif"),
token("elif"),
space(),
maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks),
]
)
} else {
text("else").fmt(f)
token("else").fmt(f)
}
}),
)