Unmarshal slices of strings

This commit is contained in:
Thomas Pelletier
2021-03-13 22:07:36 -05:00
parent 1fafb71fd9
commit a0548e793c
6 changed files with 286 additions and 139 deletions
+4 -1
View File
@@ -77,7 +77,10 @@ func unmarshalString(x target, node *ast.Node) error {
func unmarshalArray(x target, node *ast.Node) error {
assertNode(ast.Array, node)
x.ensure()
err := x.ensureSlice()
if err != nil {
return err
}
for _, n := range node.Children {
v, err := x.pushNew()