Forgot boolean constants..
This commit is contained in:
parent
e47bac1f96
commit
12abef5ed5
@ -20,6 +20,7 @@
|
||||
|
||||
from hy.models.expression import HyExpression
|
||||
from hy.models.string import HyString
|
||||
from hy.models.symbol import HySymbol
|
||||
from hy.models.list import HyList
|
||||
from hy.models.integer import HyInteger
|
||||
from hy.models.float import HyFloat
|
||||
@ -57,6 +58,7 @@ def _wrap_value(x):
|
||||
return wrapper(x)
|
||||
|
||||
_wrappers = {int: HyInteger,
|
||||
bool: lambda x: HySymbol("True") if x else HySymbol("False"),
|
||||
float: HyFloat,
|
||||
complex: HyComplex,
|
||||
str_type: HyString,
|
||||
|
@ -15,6 +15,11 @@
|
||||
(defmacro an-int [] 42)
|
||||
(assert (= (an-int) 42))
|
||||
|
||||
(defmacro a-true [] True)
|
||||
(assert (= (a-true) True))
|
||||
(defmacro a-false [] False)
|
||||
(assert (= (a-false) False))
|
||||
|
||||
(defmacro a-float [] 42.)
|
||||
(assert (= (a-float) 42.))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user