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