diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2019-06-05 14:45:27 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2019-06-05 14:45:27 +0200 |
commit | 4197555e6f7fa732bb5bf605c850972bdd84ad29 (patch) | |
tree | c6a5cc3ed33da4d69ea9f21478cc7ec3910c3273 /modules | |
parent | 34e129e7e54e4ca2b697429a5fd629ecf7516a62 (diff) |
module: Use "zero?" and "unless".
* modules/language/python/module/re/compile.scm (startine, dotall,
multiline, f-s, get-ch): Use "zero?" and "unless".
Diffstat (limited to 'modules')
-rw-r--r-- | modules/language/python/module/re/compile.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/language/python/module/re/compile.scm b/modules/language/python/module/re/compile.scm index ac2fad5..aea2c27 100644 --- a/modules/language/python/module/re/compile.scm +++ b/modules/language/python/module/re/compile.scm @@ -68,19 +68,19 @@ (define startline (<p-lambda> (c) - (when (= N 0) + (when (zero? N) (<p-cc> c)))) (define dotall (<p-lambda> (c) (let ((x (fluid-ref *flags*))) - (when (not (= 0 (logand x DOTALL))) + (unless (zero? (logand x DOTALL)) (<p-cc> c))))) (define multiline (<p-lambda> (c) (let ((x (fluid-ref *flags*))) - (when (not (= 0 (logand x MULTILINE))) + (unless (zero? (logand x MULTILINE)) (<p-cc> c))))) (define (gt f) @@ -256,7 +256,7 @@ (lambda (x) (let ((fl (fluid-ref *flags*))) (and - (= (logand fl ASCII) 0) + (zero? (logand fl ASCII)) (char-whitespace? x))))) f-nl! (f-reg! "[\n\r \t\f\v]"))) @@ -348,9 +348,9 @@ (let ((chx (string-ref x 0))) (f-test! (lambda (ch) (let ((y (fluid-ref *flags*))) - (if (= 0 (logand y IGNORECASE)) + (if (zero? (logand y IGNORECASE)) (eq? ch chx) - (if (= 0 (logand y ASCII)) + (if (zero? (logand y ASCII)) (eq? (char-upcase chx) (char-upcase ch)) (if (and (< (char->integer ch) 128) (< (char->integer chx) 128)) |