Minor stylistic change to compiler.py

This commit is contained in:
Christopher Allan Webber 2013-04-01 18:41:55 -05:00
parent 426c7cd829
commit b4ba4087df

View File

@ -528,11 +528,14 @@ class HyASTCompiler(object):
name = "_hy_anon_fn_%d" % (self.anon_fn_count) name = "_hy_anon_fn_%d" % (self.anon_fn_count)
sig = expression.pop(0) sig = expression.pop(0)
ret = ast.FunctionDef(name=name, ret = ast.FunctionDef(
name=name,
lineno=expression.start_line, lineno=expression.start_line,
col_offset=expression.start_column, col_offset=expression.start_column,
args=ast.arguments(args=[ args=ast.arguments(
ast.Name(arg=str(x), id=str(x), args=[
ast.Name(
arg=str(x), id=str(x),
ctx=ast.Param(), ctx=ast.Param(),
lineno=x.start_line, lineno=x.start_line,
col_offset=x.start_column) col_offset=x.start_column)