in format.go [693:709]
func (un *formatter) visitSelectInternal(operand ast.Expr, testOnly bool, op, field string) error {
// handle the case when the select expression was generated by the has() macro.
if testOnly {
un.WriteString("has(")
}
nested := !testOnly && isBinaryOrTernaryOperator(operand)
err := un.visitMaybeNested(operand, nested)
if err != nil {
return err
}
un.WriteString(op)
un.WriteString(field)
if testOnly {
un.WriteString(")")
}
return nil
}