Error in syntax-parse

no :slight_smile:

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)

the solution was:

(define (emit-interaction stx)
  (syntax-parse stx
    #:context '|error while parsing interaction|
		[(~var expr-or-def)
                 (strip-context (syntax expr-or-def))]))

but i find yesterday that i can do the same with:

(datum->syntax #f result)

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.

Damien