From: Chris Hanson Date: Thu, 21 Dec 2017 06:17:41 +0000 (-0800) Subject: Support OR in syntax-check. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~429 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5ac130196dcbcec6248107a40c3c70cbd5071d0c;p=mit-scheme.git Support OR in syntax-check. --- diff --git a/src/runtime/syntax-check.scm b/src/runtime/syntax-check.scm index d8f415768..1db64bddf 100644 --- a/src/runtime/syntax-check.scm +++ b/src/runtime/syntax-check.scm @@ -85,6 +85,12 @@ USA. (syntax-match? (cddr pattern) (cdr object))) (syntax-match? (cddr pattern) object)) (match-error))) + ((or) + (if (list? (cdr pattern)) + (any (lambda (pattern) + (syntax-match? pattern object)) + (cdr pattern)) + (match-error))) ((QUOTE) (if (and (pair? (cdr pattern)) (null? (cddr pattern)))