Merge branch 'jd/print-compile-error-in-repl' of git://github.com/jd/hy

This commit is contained in:
Paul Tagliamonte 2013-04-03 09:01:57 -04:00
commit f1ed021219

8
bin/hy
View File

@ -51,8 +51,12 @@ class HyREPL(code.InteractiveConsole):
tokens = process(_machine.nodes) tokens = process(_machine.nodes)
_machine = Machine(Idle, 1, 0) _machine = Machine(Idle, 1, 0)
_ast = hy_compile(tokens, root=ast.Interactive) try:
code = compile(_ast, filename, symbol) _ast = hy_compile(tokens, root=ast.Interactive)
code = compile(_ast, filename, symbol)
except Exception:
self.showtraceback()
return False
self.runcode(code) self.runcode(code)
return False return False