Remove PyPy line number hack (closes #977)

This commit is contained in:
Ryan Gonzalez 2016-01-15 11:50:15 -06:00
parent f9cf39ee73
commit 6e66edd7a0

View File

@ -2583,11 +2583,6 @@ def hy_compile(tree, module_name, root=ast.Module, get_expr=False):
`last_expression` is the.
"""
if hasattr(sys, "subversion"):
implementation = sys.subversion[0].lower()
elif hasattr(sys, "implementation"):
implementation = sys.implementation.name.lower()
body = []
expr = None
@ -2607,12 +2602,6 @@ def hy_compile(tree, module_name, root=ast.Module, get_expr=False):
ret = root(body=body)
# PyPy _really_ doesn't like the ast going backwards...
if implementation != "cpython":
for node in ast.walk(ret):
node.lineno = 1
node.col_offset = 1
if get_expr:
expr = ast.Expression(body=expr)
ret = (ret, expr)