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