(e ast.Expr)
| 645 | } |
| 646 | |
| 647 | func (c *coster) costCreateStruct(e ast.Expr) CostEstimate { |
| 648 | msgVal := e.AsStruct() |
| 649 | var sum CostEstimate |
| 650 | for _, ent := range msgVal.Fields() { |
| 651 | field := ent.AsStructField() |
| 652 | sum = sum.Add(c.cost(field.Value())) |
| 653 | } |
| 654 | return sum.Add(createMessageBaseCost) |
| 655 | } |
| 656 | |
| 657 | func (c *coster) costComprehension(e ast.Expr) CostEstimate { |
| 658 | comp := e.AsComprehension() |