How can we write a nothing
macro that expands the following lines as described in their comments?
(nothing + 1 2) ; -> (+ 1 2)
(+ 1 nothing 2) ; -> (+ 1 2)
(nothing) ; -> ; (just a blank line)
Something like the following would work if the occurrences of #'0
could be replaced with "the empty syntax", if such a thing exists.
(define-syntax (nothing stx)
(syntax-parse stx
[(nothing) #'0]
[(nothing body ...) #'(body ...)]
[nothing #'0]))
So I suppose the question could be, "how do you represent empty syntax in racket?", but this is the context.