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

Add emit header pragma #905

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

Add emit header pragma #905

gradha opened this issue Feb 12, 2014 · 1 comment
Labels

Comments

@gradha
Copy link
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
Copy link
Member

Araq commented Oct 21, 2016

The --header switch will be removed.

@Araq Araq closed this as completed Oct 21, 2016
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Sep 16, 2023
## Summary

Enable `nkError` propagation for `semWhile` and also change the
procedure to not modify the input AST.

## Details

For automatic error propagation, `semWhile` now returns an
`ElaborateAst` instead of a raw `PNode`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants