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/jsonschema/decode.go b/encoding/jsonschema/decode.go index c644ff0..afa502d 100644 --- a/encoding/jsonschema/decode.go +++ b/encoding/jsonschema/decode.go
@@ -226,9 +226,7 @@ add(ast.NewList(&ast.Ellipsis{})) } case "object": - elps := &ast.Ellipsis{} - st := &ast.StructLit{Elts: []ast.Decl{elps}} - add(st) + add(ast.NewStruct(&ast.Ellipsis{})) default: s.errf(n, "unknown type %q", n) }