Eval evaluates the left-hand side optional to determine whether it contains a value, else proceeds with the right-hand side evaluation.
(ctx interpreter.Activation)
| 785 | // Eval evaluates the left-hand side optional to determine whether it contains a value, else |
| 786 | // proceeds with the right-hand side evaluation. |
| 787 | func (opt *evalOptionalOr) Eval(ctx interpreter.Activation) ref.Val { |
| 788 | return opt.Exec(interpreter.AsFrame(ctx)) |
| 789 | } |
| 790 | |
| 791 | // evalOptionalOrValue selects between an optional or a concrete value. If the optional has a value, |
| 792 | // its value is returned, otherwise the alternative value expression is evaluated and returned. |