Qualify observes the qualification of a object via a constant boolean, int, string, or uint.
(vars Activation, obj any)
| 1140 | |
| 1141 | // Qualify observes the qualification of a object via a constant boolean, int, string, or uint. |
| 1142 | func (e *evalWatchConstQual) Qualify(vars Activation, obj any) (any, error) { |
| 1143 | out, err := e.ConstantQualifier.Qualify(vars, obj) |
| 1144 | var val ref.Val |
| 1145 | if err != nil { |
| 1146 | val = types.LabelErrNode(e.ID(), types.WrapErr(err)) |
| 1147 | } else { |
| 1148 | val = e.adapter.NativeToValue(out) |
| 1149 | } |
| 1150 | e.observer(vars, e.ID(), e.ConstantQualifier, val) |
| 1151 | return out, err |
| 1152 | } |
| 1153 | |
| 1154 | // QualifyIfPresent conditionally qualifies the variable and only records a value if one is present. |
| 1155 | func (e *evalWatchConstQual) QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) { |
nothing calls this directly
no test coverage detected