def exitRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'exitMethod_name'):
        listener.exitMethod_name(self)
def exitRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'exitMethod_name'):
        listener.exitMethod_name(self)