diff --git a/scheme/last-revision b/scheme/last-revision index 003638a..a848267 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1280 +1281 diff --git a/scheme/psyntax.expander.ss b/scheme/psyntax.expander.ss index 18cd9b0..6d21300 100644 --- a/scheme/psyntax.expander.ss +++ b/scheme/psyntax.expander.ss @@ -460,11 +460,23 @@ ;;; strip is used to remove the wrap of a syntax object. ;;; It takes an stx's expr and marks. If the marks contain ;;; a top-mark, then the expr is returned. + + (define (strip-annotations x) + (cond + [(pair? x) + (cons (strip-annotations (car x)) + (strip-annotations (cdr x)))] + [(annotation? x) (annotation-stripped x)] + [else x])) + (define strip (lambda (x m*) (if (top-marked? m*) - (if (annotation? x) - (annotation-stripped x) + (if (or (annotation? x) + (and (pair? x) + (annotation? (car x)))) + ;;; TODO: Ask Kent why this is a sufficient test + (strip-annotations x) x) (let f ((x x)) (cond