From 884e534162ea190b72b53dbe0973980f6caf55c5 Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Sun, 17 Sep 2017 00:13:25 +0200 Subject: tuples --- modules/language/python/compile.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm index 734fe60..3b5bd8f 100644 --- a/modules/language/python/compile.scm +++ b/modules/language/python/compile.scm @@ -698,10 +698,25 @@ (() ''()) (((#:starexpr #:power #f (#:list . l) . _) . _) (lp l)) + (((#:starexpr #:power #f (#:tuple . l) . _) . _) + (lp l)) (((#:starexpr . l) . _) `(,(L 'to-list) ,(exp vs l))) ((x . l) `(cons ,(exp vs x) ,(lp l)))))))) + (#:tuple + ((_ . l) + (let lp ((l l)) + (match l + (() ''()) + (((#:starexpr #:power #f (#:list . l) . _) . _) + (lp l)) + (((#:starexpr #:power #f (#:tuple . l) . _) . _) + (lp l)) + (((#:starexpr . l) . _) + `(,(L 'to-list) ,(exp vs l))) + ((x . l) + `(cons ,(exp vs x) ,(lp l))))))) (#:lambdef ((_ v e) -- cgit v1.2.3