Added line and column offsets

This commit is contained in:
James King 2013-04-18 18:39:49 -04:00
parent 70e0d88149
commit 263d7af0fc

View File

@ -229,8 +229,13 @@ class HyASTCompiler(object):
if type(expr) != HyDict:
raise TypeError("FOOBAR")
else:
if len(keywords) > 0:
raise HyCompileError("There can only be "
"one &key argument")
keywords = [ast.keyword(arg=ast_str(k),
value=self.compile(v))
value=self.compile(v),
lineno=expr.start_line,
col_offset=expr.start_column)
for k, v in expr.items()]
elif lambda_keyword == "&optional":
# not implemented yet.