summaryrefslogtreecommitdiff
path: root/modules/language/python/module/re/compile.scm
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-07-23 15:34:36 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-07-23 15:34:36 +0200
commite81fc8b27caa57c158b0f33d839404ddd44db17b (patch)
tree196f1aa4f21c2aa1654d7d2cd7526c53e8af4b63 /modules/language/python/module/re/compile.scm
parent26f5f9714cfaf1f39c4c30003de9d2221b55175a (diff)
regexp ranges
Diffstat (limited to 'modules/language/python/module/re/compile.scm')
-rw-r--r--modules/language/python/module/re/compile.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/language/python/module/re/compile.scm b/modules/language/python/module/re/compile.scm
index 927f833..3d7bdb1 100644
--- a/modules/language/python/module/re/compile.scm
+++ b/modules/language/python/module/re/compile.scm
@@ -213,7 +213,8 @@
((#:op x #:+?) (list #:op (reverse-form x) #:+?))
((#:op x #:??) (list #:op (reverse-form x) #:??))
((and a (#:ch (#:class x))) a)
- ((and a (#:ch x)) a)
+ ((and a (#:ch x)) a)
+ ((and a (#:range x)) a)
((and a (#:bracket not ch ...)) a)))
@@ -420,6 +421,8 @@
(let ((f (apply f-or!
(map (lambda (x)
(match x
+ ((#:range ch1 ch2)
+ (f-reg! (format #f "[~a-~a]" ch1 ch2)))
((#:ch (#:class ch))
(get-class ch))
((#:ch ch)