From e7afaeac498c66209f6b2f2ce6667143fbce3bc1 Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Mon, 13 Feb 2023 17:10:10 +1100 Subject: [PATCH] support tuple binding in nim < 1.6 --- questionable/binding.nim | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/questionable/binding.nim b/questionable/binding.nim index a23684d..0673667 100644 --- a/questionable/binding.nim +++ b/questionable/binding.nim @@ -48,13 +48,17 @@ macro bindTuple(name, expression): bool = bindFailed(evaluated) placeholder(`T`) + # build tuple unpacking statement, eg: + # let (a, b) = `valueNode` + let tplNode = nnkVarTuple.newTree() + for i in 0..