haxe
haxe copied to clipboard
Add JVM annotations within annotations
This allows annotations within annotations for JVM only; The syntax is the same as the toplevel, i.e. a path then a call with a list of equal pairs. sorry if I made any oopsies in the formatting for haxe, this is my first time writing ocaml.
https://github.com/TheDrawingCoder-Gamer/haxe_annotations test of it that works for me (it produces a valid jar that when decompiled shows the expected annotation)
Hm, I don't know if I want no @:meta or an @:meta. Currently it has no @:meta, but it could be changed to have one.
For reference here's an implementation I made a while back, which takes the approach with @:meta.
Ie @:meta(SomeAnnotation(value = @:meta SomeAnnotation(value = ...))
https://github.com/Apprentice-Alchemist/haxe/commit/cdd469d75be805e4aa85a3445e491dd7a319c43e
The question has to be if the inner @:meta actually improves anything. If it just means adding it in front of every call then I don't see the point. However, I think it should at least be supported, i.e. ignored.