#lang racket(require (for-syntax syntax/parse)) ; I want A to take a (B x y) expand it to be passed to C.; (A (B 1 2)); -> (C (in 1 2))(define-syntax (A stx) (syntax-case stx (A) [(A b) (with-syntax ([expanded-b #'b]) ; <- what goes here? #'(C expanded-b))])) (define-syntax (B stx) (syntax-case stx (B) [(B x y) #'(in x y)])) (define-syntax (C stx) (syntax-case stx (C in) [(C (in x y)) #'(printf "~a ~a ~n" x y)])) (A (B 1 2)) ; expect to print "1 2 ~n"(with-syntax ([expanded-b (datum->syntax #'b (local-expand #'b 'expression #f))])
> To unsubscribe from this group and stop receiving emails from it, send an email to racket...@googlegroups.com.