def handle_limit(func):
    sub = func.limit_sub()
    if sub.LETTER_NO_E():
        var = sympy.Symbol(sub.LETTER_NO_E().getText(), real=True)
    elif sub.GREEK_LETTER():
        var = sympy.Symbol(sub.GREEK_LETTER().getText()[1:], real=True)
    else:
        var = sympy.Symbol('x', real=True)
    if sub.SUB():
        direction = '-'
    else:
        direction = '+'
    approaching = convert_expr(sub.expr())
    content = convert_mp(func.mp())
    return sympy.Limit(content, var, approaching, direction)
def handle_limit(func):
    sub = func.limit_sub()
    if sub.LETTER_NO_E():
        var = sympy.Symbol(sub.LETTER_NO_E().getText(), real=True)
    elif sub.GREEK_LETTER():
        var = sympy.Symbol(sub.GREEK_LETTER().getText()[1:], real=True)
    else:
        var = sympy.Symbol('x', real=True)
    if sub.SUB():
        direction = '-'
    else:
        direction = '+'
    approaching = convert_expr(sub.expr())
    content = convert_mp(func.mp())
    return sympy.Limit(content, var, approaching, direction)