Observe records the evaluation state for a given expression node and program step.
(vars Activation, id int64, programStep any, val ref.Val)
| 151 | |
| 152 | // Observe records the evaluation state for a given expression node and program step. |
| 153 | func (et *evalStateFactory) Observe(vars Activation, id int64, programStep any, val ref.Val) { |
| 154 | frame, ok := vars.(*ExecutionFrame) |
| 155 | if !ok { |
| 156 | return |
| 157 | } |
| 158 | if frame.ctx == nil || frame.ctx.state == nil { |
| 159 | return |
| 160 | } |
| 161 | frame.ctx.state.SetValue(id, val) |
| 162 | } |
| 163 | |
| 164 | // CustomDecorator configures a custom interpretable decorator for the program. |
| 165 | func CustomDecorator(dec InterpretableDecorator) PlannerOption { |