From e81fc8b27caa57c158b0f33d839404ddd44db17b Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Mon, 23 Jul 2018 15:34:36 +0200 Subject: regexp ranges --- modules/language/python/module/re/compile.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/language/python/module/re/compile.scm') 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) -- cgit v1.2.3