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