cue/ast: add NewLit helper

Change-Id: I36810984e1b6e8ad164263510ff8fc5c31bbb095
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4903
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/protobuf/parse.go b/encoding/protobuf/parse.go
index 2cca457..c5c8c14 100644
--- a/encoding/protobuf/parse.go
+++ b/encoding/protobuf/parse.go
@@ -630,7 +630,7 @@
 			// Add enum value to map
 			f := &ast.Field{
 				Label: p.stringLit(y.Position, y.Name),
-				Value: &ast.BasicLit{Value: strconv.Itoa(y.Integer)},
+				Value: ast.NewLit(token.INT, strconv.Itoa(y.Integer)),
 			}
 			valueMap.Elts = append(valueMap.Elts, f)