equals() and hashCode() for AST and errors/warnings