projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddc7bbb
)
Support OR in syntax-check.
author
Chris Hanson
<org/chris-hanson/cph>
Thu, 21 Dec 2017 06:17:41 +0000
(22:17 -0800)
committer
Chris Hanson
<org/chris-hanson/cph>
Thu, 21 Dec 2017 06:17:41 +0000
(22:17 -0800)
src/runtime/syntax-check.scm
patch
|
blob
|
history
diff --git
a/src/runtime/syntax-check.scm
b/src/runtime/syntax-check.scm
index d8f41576875d16c8121d861e0789cb60696149b4..1db64bddf5d7939358b13fd9078113182ebbffec 100644
(file)
--- 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)))