Access to expression metadata in output generator

I’m trying to modify the output of the js generator so that if a function is prepended with @:js.async metadata then the compiler would add “async” before the function.

I’m able to do this for class member functions without any problems but I ran into a problem when adding support for function expressions.

Compiling with -D dump=pretty I notice that all user provided metadata on expressions is gone. My assumption is that the dump reflects also what the js generator is receiving so I’d not be able to implement this feature in this stage of compilation.

Is there a way to make user expression metadata reach the code generation stage?