mes: Fix for pmatch on bootstrappable syntax-rules.
* module/mes/pmatch.scm (ppat): Do not use let. * tests/pmatch.test ("pmatch nyacc minimal", "pmatch nyacc"): Test it.
This commit is contained in:
parent
49de95fe5d
commit
2aafee0163
|
@ -77,6 +77,7 @@
|
|||
((_ v (x . y) kt kf)
|
||||
(if (pair? v)
|
||||
(let ((vx (car v)) (vy (cdr v)))
|
||||
(ppat vx x (ppat vy y kt kf) kf))
|
||||
;;(ppat vx x (ppat vy y kt kf) kf) ;; FIXME: broken with syntax.scm
|
||||
(ppat (car v) x (ppat (cdr v) y kt kf) kf))
|
||||
kf))
|
||||
((_ v lit kt kf) (if (eq? v (quote lit)) kt kf))))
|
||||
|
|
|
@ -41,7 +41,14 @@ exit $?
|
|||
(pmatch o
|
||||
(_ o))))
|
||||
|
||||
(pass-if-equal "pmatch" "main"
|
||||
(pass-if-equal "pmatch nyacc minimal" "main"
|
||||
(let* ((ast '(("main") PARAM-LIST))
|
||||
(mets (pmatch ast
|
||||
(((,name) _) name))))
|
||||
;;(format (current-error-port) "mets: ~s\n" mets)
|
||||
mets))
|
||||
|
||||
(pass-if-equal "pmatch nyacc" "main"
|
||||
(let ((ast '(fctn-defn
|
||||
(decl-spec-list (type-spec (fixed-type "int")))
|
||||
(ftn-declr
|
||||
|
|
Loading…
Reference in a new issue