Method decoration

Is there a way to add target specific modifiers/annotations to the output generated by haxe?
Inside a method I can use Syntax.code, but outside it there is no equivalent way.

For example, I’d like to write haxe code as the following

@:private function myfunc() {}
or
@:async function myfunc() {}

and get these outputs

private void myfunc() {}

async def myfunc():