diff --git a/expand.scm b/expand.scm
index ad3130b..a23c8ec 100644
|
a
|
b
|
|
| 770 | 770 | (lambda (a) |
| 771 | 771 | (cond ((symbol? a) |
| 772 | 772 | (dd `(RENAME/LOOKUP: ,sym --> ,a)) |
| | 773 | (set! renv (cons (cons sym a) renv)) |
| 773 | 774 | a) |
| 774 | 775 | (else |
| 775 | 776 | (let ((a2 (macro-alias sym se))) |
| … |
… |
|
| 824 | 825 | r) |
| 825 | 826 | ")") |
| 826 | 827 | r)) |
| | 828 | (define (assq-reverse s l) |
| | 829 | (cond |
| | 830 | ((null? l) #f) |
| | 831 | ((eq? (cdar l) s) (car l)) |
| | 832 | (else (assq-reverse s (cdr l))))) |
| 827 | 833 | (define (mirror-rename sym) |
| 828 | 834 | (cond ((pair? sym) |
| 829 | 835 | (cons (mirror-rename (car sym)) (mirror-rename (cdr sym)))) |
| … |
… |
|
| 836 | 842 | (lambda (name) |
| 837 | 843 | (dd "STRIP SYNTAX ON " sym " ---> " name) |
| 838 | 844 | name)) |
| | 845 | ((assq-reverse sym renv) => |
| | 846 | (lambda (a) |
| | 847 | (dd "REVERSING RENAME: " sym " --> " (car a)) (car a))) |
| 839 | 848 | ((not renamed) |
| 840 | 849 | (dd "IMPLICITLY RENAMED: " sym) (rename sym)) |
| 841 | 850 | ((pair? renamed) |
diff --git a/tests/syntax-tests.scm b/tests/syntax-tests.scm
index 49aafcb..5228ded 100644
|
a
|
b
|
|
| 579 | 579 | (1 ==> (lambda (x) x)) |
| 580 | 580 | (else 'yep)))) |
| 581 | 581 | |
| | 582 | ;; Literal quotation of a symbol, injected or not, should always result in that symbol |
| | 583 | (module ir-se-test (run) |
| | 584 | (import chicken scheme) |
| | 585 | (define-syntax run |
| | 586 | (ir-macro-transformer |
| | 587 | (lambda (e i c) |
| | 588 | `(quote ,(i 'void)))))) |
| | 589 | |
| | 590 | (import ir-se-test) |
| | 591 | (t 'void (run)) |
| 582 | 592 | |
| 583 | 593 | ;;; local definitions |
| 584 | 594 | |