Using UFUNCTION within a macro

I have a bit of code that looks like

#define QUEST_WRAPPER_PARAM_DEF(RETURN_TYPE,FUNCTION, ...) \
UFUNCTION(BlueprintCallable, Category = "Quest System", meta = (DisplayName = #FUNCTION ))\
static RETURN_TYPE Receive##FUNCTION(UObject* WorldContextObject,__VA_ARGS__);\
RETURN_TYPE FUNCTION(__VA_ARGS__);

And it compiles fine but the UFUCTION markup seems to not work : /

it really doesn’t like this

UFUNCTION(BlueprintCallable, Category = "Quest System", meta = (DisplayName = HorDor))
QUEST_WRAPPER_PARAM_DEF(void,HorDor)

welp that’s no fun.

Unless someone else says otherwise, UNFUNCTION wouldn’t be compatible with a Macro because, there’s no function to reference! When you use a macro, it just injects that code, at compile time, where you call it. So there’d be no function address or anything.

It also seems like the markup is applied before the macros are expanded so you can’t even take UFUNCTION out of the macro and have it work. As a lispy programmer this makes me sad.