Open camoy opened 9 months ago
(require (for-syntax syntax/parse) syntax-spec) (syntax-spec (nonterminal nt #:bind-literal-set lits #:binding-space sp (foo e:racket-expr)) (host-interface/expression (bar e:nt) #'(translate e))) (define-syntax translate (syntax-parser #:literal-sets (lits) [(_ (foo e)) #'e])) (bar (foo (+ 1 2)))
gives me
; /home/camoy/tmp/blah.rkt:14:4: translate: expected the identifier `foo' ; at: foo ; in: (translate (foo (#%host-expression (+ 1 2)))) ; Source locations: ; /home/camoy/tmp/blah.rkt:10:4
but it works without the binding space.
I think supporting this combination would require adding support for binding spaces to syntax-parse and define-literal-set.
define-literal-set
gives me
but it works without the binding space.