Call _wrap_value recursively on HyExpressions.

Without this, cases like:

    (defmacro foo [] `(~0))
    (foo)

throw exceptions, because the embedded zero is not a HyObject.
This commit is contained in:
Ian Denhardt 2014-09-21 11:36:40 -04:00
parent 28c046c180
commit 4d2aad1b0f
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ _wrappers = {
list: lambda l: HyList(_wrap_value(x) for x in l),
tuple: lambda t: HyList(_wrap_value(x) for x in t),
type(None): lambda foo: HySymbol("None"),
HyExpression: lambda e: HyExpression(_wrap_value(x) for x in e),
}
if sys.version_info[0] < 3: # do not add long on python3