From 5ac130196dcbcec6248107a40c3c70cbd5071d0c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 20 Dec 2017 22:17:41 -0800 Subject: [PATCH] Support OR in syntax-check. --- src/runtime/syntax-check.scm | 6 ++++++ 1 file changed, 6 insertions(+) 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))) -- 2.25.1