Function
NewConditional
(sctx *super.Context, predicate, thenExpr, elseExpr Evaluator)
Source from the content-addressed store, hash-verified
| 795 | } |
| 796 | |
| 797 | func NewConditional(sctx *super.Context, predicate, thenExpr, elseExpr Evaluator) *Conditional { |
| 798 | return &Conditional{ |
| 799 | sctx: sctx, |
| 800 | predicate: predicate, |
| 801 | thenExpr: thenExpr, |
| 802 | elseExpr: elseExpr, |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | func (c *Conditional) Eval(this super.Value) super.Value { |
| 807 | val := c.predicate.Eval(this).Deunion() |
Tested by
no test coverage detected