cue/ast: rename EmitDecl
Preparaton for closed structs.
Change-Id: Ic8318a160a14aa1cc83da362bd86b573ee0398ee
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2704
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/yaml/yaml.go b/encoding/yaml/yaml.go
index 3db8b08..24f0f18 100644
--- a/encoding/yaml/yaml.go
+++ b/encoding/yaml/yaml.go
@@ -57,10 +57,10 @@
case *ast.StructLit:
f.Decls = x.Elts
default:
- f.Decls = []ast.Decl{&ast.EmitDecl{Expr: x}}
+ f.Decls = []ast.Decl{&ast.EmbedDecl{Expr: x}}
}
default:
- f.Decls = []ast.Decl{&ast.EmitDecl{Expr: &ast.ListLit{Elts: a}}}
+ f.Decls = []ast.Decl{&ast.EmbedDecl{Expr: &ast.ListLit{Elts: a}}}
}
return f, nil
}