def enterRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'enterMethod_name'):
        listener.enterMethod_name(self)
def enterRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'enterMethod_name'):
        listener.enterMethod_name(self)