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

Generate type alias header files #622

Open
Kronos3 opened this issue Feb 19, 2025 · 0 comments
Open

Generate type alias header files #622

Kronos3 opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
code generation Issues related to code generation

Comments

@Kronos3
Copy link
Collaborator

Kronos3 commented Feb 19, 2025

After discussion with @bocchino we decided to perform type alias codegen with the following:

  • Generate a .hpp file that has the proper namespaceing based on module
  • If the type alias definition is "simple" and supports C header generation (see below):
    • Generate a .h file with a C-style typedef
    • Generate a .hpp file that includes the .h file
  • Otherwise:
    • Generate a .hpp with the proper module/namespacing with the type alias typedef

Simple Type alias

Simple type aliases are those that support being defined as C types. They must meet all the following requirements

  • Exist in the global namespace
  • Alias of one of the following types:
    • U8 I8 U16 I16 U32 I32 U64 I64 F32 F64
    • Another "simple type"

Related to #113

@Kronos3 Kronos3 self-assigned this Feb 19, 2025
@Kronos3 Kronos3 added the code generation Issues related to code generation label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code generation Issues related to code generation
Projects
None yet
Development

No branches or pull requests

1 participant