cue/ast: add NewStruct helper

Change-Id: Ie6acb637416a2be06325362346b6aad0bc702ed7
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/4902
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/protobuf/parse.go b/encoding/protobuf/parse.go
index b35e6ae..2cca457 100644
--- a/encoding/protobuf/parse.go
+++ b/encoding/protobuf/parse.go
@@ -528,7 +528,7 @@
 		name := p.ident(x.Position, x.Name)
 		f = &ast.Field{
 			Label: name,
-			Value: &ast.StructLit{Elts: []ast.Decl{f}},
+			Value: ast.NewStruct(f),
 		}
 		addComments(f, i, x.Comment, x.InlineComment)