diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-04-05 14:49:56 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-04-05 14:49:56 +0200 |
commit | cf6475b2a895db02b7558dec341db7ba1ca8be20 (patch) | |
tree | 9b134a07f860e3e1f585ef8b343322707b50c3e7 /modules/language | |
parent | 427fe943328dc964bfe75448e86abe15682accda (diff) |
python parser
Diffstat (limited to 'modules/language')
-rw-r--r-- | modules/language/python/compile.scm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm index 8f5139d..ad341a5 100644 --- a/modules/language/python/compile.scm +++ b/modules/language/python/compile.scm @@ -1276,8 +1276,11 @@ (#:return - ((_ . x) - `(,(fluid-ref return) ,@(map (g vs exp) x)))) + ((_ x) + (if x + `(,(fluid-ref return) ,@(map (g vs exp) x)) + `(,(fluid-ref return))))) + (#:dict ((_ . #f) @@ -1917,10 +1920,14 @@ (define-syntax boolit - (syntax-rules (and or not) + (syntax-rules (and or not < <= > >=) ((_ (and x y)) (and (boolit x) (boolit y))) ((_ (or x y)) (or (boolit x) (boolit y))) ((_ (not x )) (not (boolit x))) + ((_ (< x y)) (< x y)) + ((_ (<= x y)) (<= x y)) + ((_ (> x y)) (> x y)) + ((_ (>= x y)) (>= x y)) ((_ #t) #t) ((_ #f) #f) ((_ x ) (bool x)))) |