Implement WriteExpr for logical expressions.