cmd/cue: correctly import comments after a field key
The YAML decoder attached an inline key comment to the label,
rather than to the entire field, which caused the comment to be printed
before the colon character and cause weird formatting.
Then teach cue/format to print an inline comment on a field colon.
Fixes #3214.
Change-Id: I17e669bc6c129dde86478d604a28d07fc63f7b69
Signed-off-by: haoqixu <hq.xu0o0@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196291
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
authored by