(heights map[int64]int, e ast.NavigableExpr, amount int)
| 614 | } |
| 615 | |
| 616 | func reduceHeight(heights map[int64]int, e ast.NavigableExpr, amount int) { |
| 617 | height := heights[e.ID()] |
| 618 | if height < amount { |
| 619 | return |
| 620 | } |
| 621 | heights[e.ID()] = height - amount |
| 622 | if parent, hasParent := e.Parent(); hasParent { |
| 623 | reduceHeight(heights, parent, amount) |
| 624 | } |
| 625 | } |
no test coverage detected