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