doing this make an error: : wildcard not allowed as an expression
after encountering unbound identifier (which is possibly the real problem):
syntax-parse in: ( expr-or-def)
i mean (emit-interaction 10) create the same strange syntax object than (datum->syntax #f 10)
same thing if argument is a variable:
(define x 3)
(emit-interaction x)
(datum->syntax #f x)
the two syntax create an object syntax , i needed this strange macro with parse-syntax because a simple one with an identifier as argument would have return a syntax object with containing identifier and not the value stored in identifier.
I agree with @jbclements and additionally you also want to use (require (for-syntax syntax/parse syntax/strip-context)). Without for-syntax you get en error messages because the syntax-parse needs to be required at syntax phase (matching the define-syntax).
Note the last two lines telling you that syntax-parse is not bound (because of missing for-syntax).
If you turn your emit-interaction into a non macro by just using define you might as well write it as a function:
(define x 3)
(define emit-interaction identity)
(emit-interaction x)
;; or alternatively
x
Please provide more context on what you are trying to accomplish, currently I don't understand what your actual goal is.
Yes i will post in another thread the whole code.Consider this problem solved. The 2 solutions was equivalent, i will use simplest one, the two solutions are not portable to another Scheme.