Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show header for formatter comment decoration info
**Summary** Show a header in the formatter comment decoration debug output that shows which node is preceding/following/enclosing (#6813 (comment)). I also kept this intentionally condensed to make it easy to use this is a small sidebar without vertical scrolling. ``` # Comment decoration: Range Preceding Following Enclosing Comment 1292..1298 Some((ExprName, 1274..1280)) Some((ExprName, 1307..1310)) (StmtAnnAssign, 1274..1316) "# type" 2507..2555 None Some((StmtIf, 2634..2891)) (StmtClassDef, 2478..3279) "# didn't match the name in the C implementation," 2560..2629 None Some((StmtIf, 2634..2891)) (StmtClassDef, 2478..3279) "# meaning it is only *safe* to pass it as a keyword argument on 3.12+" 3281..3298 Some((StmtClassDef, 2478..3279)) Some((StmtFunctionDef, 3300..3317)) (ModModule, 0..4162) "# Top level rules" 3481..3496 Some((StmtClassDef, 3452..3479)) Some((StmtClassDef, 3498..3876)) (ModModule, 0..4162) "# Nesting rules" { Node { kind: ExprName, range: 1307..1310, source: `int`, }: { ... ``` **Test Plan** It's debug output.
- Loading branch information