Add emit header pragma #905

Closed
gradha opened this Issue Feb 12, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@gradha
Contributor

gradha commented Feb 12, 2014

Similar to the {.emit.} pragma for backend code, a hypothetical {.emith.} pragma would add the emitted code to the C generated header file, which would then be public to all other C generated files and other code. One possible use would be to generate specific constants in the form of enums or #defines since they are not supported by the language now (see #826).

The pragma could accept a position parameter to specify if the generated code has to be put before or after other generated code sections. This would also be a good time to define/document the order of the sections in the header, and also annotate them with C comments to indicate that the following exported functions come from which nimrod module.

@gradha gradha added the feature label Feb 12, 2014

@Araq

This comment has been minimized.

Show comment
Hide comment
@Araq

Araq Oct 21, 2016

Member

The --header switch will be removed.

Member

Araq commented Oct 21, 2016

The --header switch will be removed.

@Araq Araq closed this Oct 21, 2016

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