commit | b236d4ad6e42511588ad3b81f46ba792015d9a94 | [log] [tgz] |
---|---|---|
author | Marcel van Lohuizen <mpvl@golang.org> | Fri Feb 07 13:14:49 2020 +0100 |
committer | Marcel van Lohuizen <mpvl@golang.org> | Fri Feb 07 14:25:37 2020 +0000 |
tree | e2d9518524be11521e91a720261b9ced57482f3e | |
parent | aae80a0d0427581fa89df80cd03167759a58e67e [diff] [blame] |
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)