AddSerializableOption adds an option to the basic environment that is flagged as YAML compatible.
(opt Optioner)
| 678 | |
| 679 | // AddSerializableOption adds an option to the basic environment that is flagged as YAML compatible. |
| 680 | func (e *Evaluator) AddSerializableOption(opt Optioner) error { |
| 681 | cpy := e.ctx.copy() |
| 682 | cpy.addOption(opt, true) |
| 683 | err := updateContextPlans(cpy, e.env) |
| 684 | if err != nil { |
| 685 | return err |
| 686 | } |
| 687 | e.ctx = *cpy |
| 688 | return nil |
| 689 | } |
| 690 | |
| 691 | // EnablePartialEval enables the option to allow partial evaluations. |
| 692 | func (e *Evaluator) EnablePartialEval() error { |