File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -650,10 +650,10 @@ func (c *compiler) decl(d ast.Decl) adt.Decl {
650650 return c .comprehension (x )
651651
652652 case * ast.EmbedDecl : // Deprecated
653- return c .embed (x .Expr )
653+ return c .expr (x .Expr )
654654
655655 case ast.Expr :
656- return c .embed (x )
656+ return c .expr (x )
657657 }
658658 return nil
659659}
@@ -769,18 +769,6 @@ func (c *compiler) comprehension(x *ast.Comprehension) adt.Elem {
769769 return first
770770}
771771
772- func (c * compiler ) embed (expr ast.Expr ) adt.Expr {
773- switch n := expr .(type ) {
774- case * ast.StructLit :
775- c .pushScope (nil , 1 , n )
776- v := & adt.StructLit {Src : n }
777- c .addDecls (v , n .Elts )
778- c .popScope ()
779- return v
780- }
781- return c .expr (expr )
782- }
783-
784772func (c * compiler ) labeledExpr (f * ast.Field , lab labeler , expr ast.Expr ) adt.Expr {
785773 k := len (c .stack ) - 1
786774 return c .labeledExprAt (k , f , lab , expr )
You can’t perform that action at this time.
0 commit comments