Add Comments data structure (#4641)

This commit is contained in:
Micha Reiser 2023-05-30 10:54:55 +02:00 committed by GitHub
parent 6146b75dd0
commit 84a5584888
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 698 additions and 0 deletions

View file

@ -0,0 +1,39 @@
---
source: crates/ruff_python_formatter/src/comments/debug.rs
expression: formatted
---
{
StmtContinue(
StmtContinue {
range: 0..0,
},
): {
"leading": [
SourceComment {
text: "# leading comment",
formatted: false,
},
],
"dangling": [],
"trailing": [
SourceComment {
text: "# trailing",
formatted: false,
},
],
},
StmtBreak(
StmtBreak {
range: 0..0,
},
): {
"leading": [
SourceComment {
text: "# break leading",
formatted: false,
},
],
"dangling": [],
"trailing": [],
},
}