haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Add JVM annotations within annotations

Open TheDrawingCoder-Gamer opened this issue 3 years ago • 4 comments

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.

TheDrawingCoder-Gamer avatar Jul 04 '22 19:07 TheDrawingCoder-Gamer

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)

TheDrawingCoder-Gamer avatar Jul 04 '22 20:07 TheDrawingCoder-Gamer

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.

TheDrawingCoder-Gamer avatar Jul 05 '22 20:07 TheDrawingCoder-Gamer

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

Apprentice-Alchemist avatar Jul 05 '22 20:07 Apprentice-Alchemist

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.

Simn avatar Aug 02 '22 05:08 Simn