diff --git a/collects/redex/private/bitmap-test.ss b/collects/redex/private/bitmap-test.ss index 6607ed5752..45de01be54 100644 --- a/collects/redex/private/bitmap-test.ss +++ b/collects/redex/private/bitmap-test.ss @@ -92,13 +92,22 @@ (render-metafunction Name)) "metafunction-Name-vertical.png") +;; makes sure that there is no overlap inside or across metafunction calls +;; or when there are unquotes involved (define-metafunction lang [(multi-arg a b c) - (multi-arg a - b - c)]) + ((multi-arg a + b + c) + (multi-arg a + b + c))] + [(multi-arg unquote-test) + (,@(term (multi-arg with-unquote)) + ,@(term (multi-arg with-unquote)) + ,@(term (multi-arg with-unquote)))]) (test (render-metafunction multi-arg) "metafunction-multi-arg.png") diff --git a/collects/redex/private/core-layout.ss b/collects/redex/private/core-layout.ss index fb9cafa273..b6cb0df392 100644 --- a/collects/redex/private/core-layout.ss +++ b/collects/redex/private/core-layout.ss @@ -257,7 +257,8 @@ (car l))]))])) (define (rewrite-metafunction-app lst line line-span col col-span something-or-other) - (list* 'spring + (list* (build-lw "" line 0 col 0) + 'spring (just-after (hbl-append (metafunction-text (symbol->string (lw-e (cadr lst)))) (open-white-square-bracket)) diff --git a/collects/redex/private/loc-wrapper.ss b/collects/redex/private/loc-wrapper.ss index 9111525460..fefa83e225 100644 --- a/collects/redex/private/loc-wrapper.ss +++ b/collects/redex/private/loc-wrapper.ss @@ -67,8 +67,7 @@ #`(init-loc-wrapper (list (init-loc-wrapper "" #,(syntax-line stx) #,(syntax-column stx) #,quoted?) 'spring - #,(process-arg (cadr (syntax->list stx)) (+ quote-depth 1)) - 'spring) + #,(process-arg (cadr (syntax->list stx)) (+ quote-depth 1))) #,(syntax-line stx) #,(syntax-column stx) #,quoted?)