pkg: drop cue/build and pkg/internal from gen.go
The code just needs to parse CUE files to extract the declarations.
There is no need to build instances and values to extract the syntax;
we can parse the syntax directly.
This gives us better results in any case,
as the resulting syntax directly follows the source.
For example, the original source uses octal integer literals
and uses some inline structs for readability, and we keep those now.
As a bonus, as we no longer use the CUE evaluator, `go generate`
drops from ~0.35s to ~0.25s on my laptop.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Id6c03c49421c4b2ead467b523bcd4f25b41c002b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201388
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>