summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/doc-syms.tl1
-rw-r--r--stdlib/match.tl5
2 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index e75ad2c7..2b0edcaf 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -1187,6 +1187,7 @@
("macroexpand-1-lisp1" "N-01E62179")
("macroexpand-1-place" "N-00684FF9")
("macroexpand-lisp1" "N-01E62179")
+ ("macroexpand-match" "N-02CCCB67")
("macroexpand-params" "N-037EB49A")
("macroexpand-place" "N-00684FF9")
("macrolet" "N-00AC12C0")
diff --git a/stdlib/match.tl b/stdlib/match.tl
index 55d50417..ff3134fd 100644
--- a/stdlib/match.tl
+++ b/stdlib/match.tl
@@ -833,6 +833,11 @@
,args ,*body)))
',name)))
+(defun macroexpand-match (pattern : env)
+ (iflet ((xfun (and (consp pattern) [*match-macro* (car pattern)])))
+ [xfun pattern env]
+ pattern))
+
(defun check (f op pat)
(if (or (not (listp pat))
(meq (car pat) 'sys:expr 'sys:var 'sys:quasi))