Skip to content

Add emit header pragma #905

@gradha

Description

@gradha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions