Mirror of https://github.com/cue-lang/cue cuelang.org
cue go

cmd/cue: correctly parse type=number and type=int tags master

That is, both should reject identifier references, and the latter should reject floats. We can do both easily if we replace cue/parser with cue/literal for the parsing of the tag string. While here, harmonize the error messages a little. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I110b5a3f9e0b3312bc27f3c0a6216125d7294429 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1228550 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Matthew Sackman <matthew@cue.works> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>


+16 -11
2 changed files