Exec implements the InterpretableV2 interface method.
(frame *ExecutionFrame)
| 1862 | |
| 1863 | // Exec implements the InterpretableV2 interface method. |
| 1864 | func (a *evalAttr) Exec(frame *ExecutionFrame) ref.Val { |
| 1865 | v, err := a.attr.Resolve(frame) |
| 1866 | var res ref.Val |
| 1867 | if err != nil { |
| 1868 | res = types.LabelErrNode(a.ID(), types.WrapErr(err)) |
| 1869 | } else { |
| 1870 | res = a.adapter.NativeToValue(v) |
| 1871 | } |
| 1872 | if _, isCond := a.attr.(*conditionalAttribute); !isCond { |
| 1873 | if costs := frame.CostTracker(); costs != nil { |
| 1874 | costs.EvalAttribute(a.ID(), false, res) |
| 1875 | } |
| 1876 | } |
| 1877 | return res |
| 1878 | } |
| 1879 | |
| 1880 | // Eval implements the Interpretable interface method. |
| 1881 | func (a *evalAttr) Eval(ctx Activation) ref.Val { |
nothing calls this directly
no test coverage detected