Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/cmd: repurpose cue-ast-print into subcommands
I want to add more helpful internal AST debugging tools for my own use, such as one to join all the CUE files in an instance into a single file to speed up my reduction of CUE bugs. Rather than adding more binaries to ./internal/cmd, rename cue-ast-print to cue-ast and give it subcommands such as "print". While here, rewrite "print" to take the same sort of inputs as cmd/cue via cue/load, for the sake of consistency and flexibility. Printing a single CUE file or stdin still works, with the only exception that stdin now works via a "-" argument, like in cmd/cue. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I254eacc7ecbc80a5b363a2c064d82ae2a0dd4c5a Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200355 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Matthew Sackman <matthew@cue.works> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information