Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract infos from from define.ml and meta.ml into JSON files #8035

Closed
Gama11 opened this issue Mar 21, 2019 · 3 comments · Fixed by #8195
Closed

Extract infos from from define.ml and meta.ml into JSON files #8035

Gama11 opened this issue Mar 21, 2019 · 3 comments · Fixed by #8195

Comments

@Gama11
Copy link
Member

Gama11 commented Mar 21, 2019

@Simn and I talked about how it might be a good idea to extract the desscriptions / "used on" info etc of defines into a JSON file. That seems more natural for something that's essentially just data than a source file.

If it's done for define.ml, it only makes sense to do the same for meta.ml. Technically we even have a JSON structure defined already for metadata due to the display API.

This would have the nice side-effect that other tools could parse it and do something with it, for instance auto-generating some Haxe Manual pages that always seem to be slightly outdated [1] [2]. @markknol said he added some additional infos to some of those things, perhaps the JSON could have "extended descriptions" in a separate field, or use markdown in the description that is post-processed away for the command line output.

@Gama11 Gama11 changed the title Extract infos from from define.ml and meta.ml into a JSON file Extract infos from from define.ml and meta.ml into JSON files Mar 21, 2019
@kLabz
Copy link
Contributor

kLabz commented Mar 22, 2019

Yeah!

I planned to do something similar, although only for meta.ml: generate HaxeMeta.hx, an @:enum abstract to String to be used in macros. Maybe such an abstract could be included in haxe std (in haxe.macro maybe?).

@Gama11
Copy link
Member Author

Gama11 commented Mar 22, 2019

That does seem like an interesting idea! I currently also maintain a (very incomplete) list of constants for metas in the language server because I wanted to avoid repeating string literals everywhere.

@kLabz
Copy link
Contributor

kLabz commented Mar 22, 2019

Yeah, plus it avoids typos and provides some documentation on autocomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants