Auto-completion via Haxe compiler

I think I am becoming stupid when it comes to know how a compiler works, at least in its entirety, so I would like someone to elaborate with me something that I feel is probably more simple than it supposedly is.

So the problem is auto-completion via the Haxe compiler. I read this wiki article on the Haxe Github page, but it’s not really saying much on how to make these calls. I’m assuming it outputs XML, which I can serialize easily.

Is it as simple as haxe --display [type] in cmd?

EDIT: Doing haxe --display Assets -lib openfl just seems to throw an error:

Invalid format: Assets so not sure what I’m doing wrong

The command is haxe --display file.hx@characterPos, but to use it with openfl you’ll need to add the command line option outputted from lime display target with target the target you use (flash/neko/…).