cmd: Fix eval subcommand to remove blank lines from partial output
The topdown package re-uses location information from AST nodes that it saves and the format package attempts to squash blank lines between adjacent expressions. As a result, the pretty/source formatted output from the eval subcommand would often contain spurious blank lines that make the output feel inconsistent. This change modifies the cmd package to overwrite the location info on all expressions so that the format package doesn't have to squash any blank lines. The cmd package walks the expressions and sets the row number in-order. Before: +----------+------------------+ | Query 1 | "R1" = input.foo | | | | | | "L1" = input.bar | +----------+------------------+ After: +----------+------------------+ | Query 1 | "R1" = input.foo | | | "L1" = input.bar | +----------+------------------+ Signed-off-by: Torin Sandall <torinsandall@gmail.com>
T
Torin Sandall committed
d3fb38adff4c879a2fd9d6c3c7265e2a23f9c14e
Parent: 2e122c9