Reimplement expression hasher as a Visitor.