You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above case there is no way to access the @:cpp.Marshal metadata from a tclass_field. In non extern functions you can inspect the cf_exprTFunction but for externs there is no expression.
I think I've found the place in typeloadFields which types functions but I'm not sure what a good approach is, append the arguments meta to cf_meta and key it by argument name somehow? Add a new cf_argument_meta field?
End goal of this to to have the compiler generate glue code for converting to and from common haxe and c++ types by annotating arguments, it would greatly simplify things being able to look at all extern classes up front as opposed to accumulating a list of all found functions while iterating over the ast.
The text was updated successfully, but these errors were encountered:
Extern functions have been quite annoying in this regard. An adjacent problem is argument default values, which are also part of the expression and required a workaround for externs.
I'd be happy to redesign this, but I'm not sure how. The cleanest approach would probably be to merge cf_kind and cf_expr, but that would cause a rather large amount of friction and I don't know if this is worth it for the potential gains.
I don't think something like cf_argument_meta would be that great because then we have redundant information for non-externs.
Currently there doesn't seem to be a way to access argument metadata on an extern function.
In the above case there is no way to access the
@:cpp.Marshal
metadata from atclass_field
. In non extern functions you can inspect thecf_expr
TFunction
but for externs there is no expression.I think I've found the place in typeloadFields which types functions but I'm not sure what a good approach is, append the arguments meta to cf_meta and key it by argument name somehow? Add a new cf_argument_meta field?
End goal of this to to have the compiler generate glue code for converting to and from common haxe and c++ types by annotating arguments, it would greatly simplify things being able to look at all extern classes up front as opposed to accumulating a list of all found functions while iterating over the ast.
The text was updated successfully, but these errors were encountered: