From 95c3541f2f4003c015df848bab02f3d9dd6508d5 Mon Sep 17 00:00:00 2001 From: z80 Date: Sun, 26 Nov 2023 21:45:22 -0500 Subject: [PATCH] don't require strings around venom code --- dasy/builtin/functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dasy/builtin/functions.py b/dasy/builtin/functions.py index 31fa1e8..e73296b 100644 --- a/dasy/builtin/functions.py +++ b/dasy/builtin/functions.py @@ -7,9 +7,12 @@ from dasy import parser +from hy import repr, read_many + def parse_venom(expr): - ir = IRnode.from_list((parse_s_exp(expr[1]))[0]) + ir = IRnode.from_list((parse_s_exp(repr(expr[1])[1:]))[0]) + # generate some vyper code to patch in. IDENTIFIER = f"__DASY_VENOM_BUILTIN_{parser.next_nodeid()}__" insert_code = f"{IDENTIFIER}()"