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

Order of C macros in the output #28

Open
attila-lendvai opened this issue Jan 28, 2016 · 3 comments
Open

Order of C macros in the output #28

attila-lendvai opened this issue Jan 28, 2016 · 3 comments

Comments

@attila-lendvai
Copy link
Contributor

it would be nice if the macros came out in a stable order, so that line diff becomes meaningful between re-runs.

not an urgent issue, it's more of a feature request.

@attila-lendvai
Copy link
Contributor Author

and of course not just macros, but also the json entries.

@rpav
Copy link
Owner

rpav commented Mar 24, 2021

The world really needs a JSON-Sorted standard.

@attila-lendvai
Copy link
Contributor Author

FTR, i've added a jq script to filter and sort the output: https://github.com/hu-dwim/hu.dwim.sdl/tree/main/bin

so far, so good, except that i haven't considered that the order of the toplevel definitions in the output is according to a specific walk of the AST that results in an order where everything is defined by the time it's referenced; i.e. reordering the output would substantially complicate its processing.

macros can be sorted, though.

in these lights i guess we can close this issue, but you may still find the scripts at the link useful.

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

No branches or pull requests

2 participants