mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Introduce Token element (#7048)
This commit is contained in:
parent
2f3a950f6f
commit
c05e4628b1
78 changed files with 733 additions and 723 deletions
|
@ -38,7 +38,7 @@ impl FormatNodeRule<StmtWhile> for FormatStmtWhile {
|
|||
ClauseHeader::While(item),
|
||||
trailing_condition_comments,
|
||||
&format_args![
|
||||
text("while"),
|
||||
token("while"),
|
||||
space(),
|
||||
maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks),
|
||||
]
|
||||
|
@ -60,7 +60,7 @@ impl FormatNodeRule<StmtWhile> for FormatStmtWhile {
|
|||
clause_header(
|
||||
ClauseHeader::OrElse(ElseClause::While(item)),
|
||||
trailing,
|
||||
&text("else")
|
||||
&token("else")
|
||||
)
|
||||
.with_leading_comments(leading, body.last()),
|
||||
clause_body(orelse, trailing),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue