reflaxe icon indicating copy to clipboard operation
reflaxe copied to clipboard

Is it possible to get import and package data from source?

Open vega0 opened this issue 8 months ago • 3 comments

Is it possible to get import and package data from source? It's needed to make moonscript import system.

vega0 avatar Mar 31 '25 13:03 vega0

Sorry, as far as I can tell, the import data is not provided in the Haxe AST.

For Reflaxe/C++, I create an array for each class and every time a type is used, I add it to the array. Then I generate the imports for all those types. I could probably add a utility in Reflaxe to iterate through the AST and generate these automatically, but at the current moment such a feature does not exist. Sorry!!

SomeRanDev avatar Mar 31 '25 20:03 SomeRanDev

Can you realize this feature and implement additional one, is possibility to get the parent of the current Ast node?

vega0 avatar Apr 03 '25 08:04 vega0

Sorry, as far as I can tell, the import data is not provided in the Haxe AST.

For Reflaxe/C++, I create an array for each class and every time a type is used, I add it to the array. Then I generate the imports for all those types. I could probably add a utility in Reflaxe to iterate through the AST and generate these automatically, but at the current moment such a feature does not exist. Sorry!!

look above

vega0 avatar Apr 03 '25 09:04 vega0