Add equal functions for ast