summaryrefslogtreecommitdiff
path: root/modules/language/python/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/compile.scm')
-rw-r--r--modules/language/python/compile.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 2edba8a..50376f6 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -148,7 +148,7 @@
(define (defs x vs)
(match x
- ((#:def ((#:identifier f) . _) . _)
+ ((#:def (#:identifier f) . _)
(union (list (string->symbol f)) vs))
((#:lambdef . _)
vs)
@@ -188,7 +188,12 @@
((sort) (L 'pylist-sort!))
;; String
- ((format) (S 'py-format))
+ ((format) (S 'py-format))
+ ((capitalize) (S 'py-capitalize))
+ ((center) (S 'py-center))
+ ((endswith) (S 'py-endswith))
+ ((expandtabs) (S 'py-expandtabs))
+ ((find) (S 'py-find))
(else #f)))
(define (get-kwarg vs arg)
@@ -232,7 +237,7 @@
(cons
(match x
- (((#:identifier . _) . _)
+ ((#:identifier . _)
(let* ((tag (exp vs x))
(xs (gensym "xs"))
(is-fkn? (aif it (and is-fkn? (fastfkn tag))
@@ -242,7 +247,7 @@
#f)))
(if is-fkn?
is-fkn?
- `((#:identifier ',tag) . _))))
+ `(#:identifier ',tag))))
((#:arglist args apply #f)
(call-with-values (lambda () (get-kwarg vs args))
@@ -293,7 +298,7 @@
("//=" 'floor-quotient)))
(match x
- ((#:test (#:power kind ((#:identifier v . _) . _) addings . _) . _)
+ ((#:test (#:power kind (#:identifier v . _) addings . _) . _)
(let ((addings (get-addings vs addings)))
(define q (lambda (x) `',x))
(if kind
@@ -367,7 +372,7 @@
(_
#f))))
(match (pr x)
- (((#:identifier . _) . _)
+ ((#:identifier . _)
(let* ((tag (exp vs x))
(xs (gensym "xs"))
(is-fkn? (aif it (and is-fkn? (fastfkn tag))