From c716c6a3424a007695af5f2f218e2887282714a3 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Tue, 19 Mar 2002 20:44:30 +0000 Subject: [PATCH] * pmacros.scm (-pmacro-expand,scan): If result is a symbol, call scan-symbol on it, to enable recursive macro-expansion. --- ChangeLog | 5 +++++ pmacros.scm | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2c1448..294078f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-03-19 Hans-Peter Nilsson + + * pmacros.scm (-pmacro-expand,scan): If result is a symbol, + call scan-symbol on it, to enable recursive macro-expansion. + 2002-01-25 Frank Ch. Eigler * sid-cpu.scm (-gen-hardware-types): Generate single hardware union diff --git a/pmacros.scm b/pmacros.scm index 67e8480..2d7786e 100644 --- a/pmacros.scm +++ b/pmacros.scm @@ -229,11 +229,11 @@ ((and (list? exp) (not (null? exp))) (scan-list exp)) ; Not a symbol or expression, return unchanged. (else exp)))) - ; ??? We use to re-examine `result' to see if it was another pmacro - ; invocation. This allowed doing things like ((.sym a b c) arg1 arg2) - ; where `abc' is a pmacro. Scheme doesn't work this way, so it was - ; removed. It can be put back should it ever be warranted. - result)) + ; Re-examining `result' to see if it is another pmacro invocation + ; allows doing things like ((.sym a b c) arg1 arg2) + ; where `abc' is a pmacro. Scheme doesn't work this way, but then + ; this is CGEN. + (if (symbol? result) (scan-symbol result) result))) (if -pmacro-trace? (begin -- 2.43.5