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

Implement and test C++ code generation for type aliases #622

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

Implement and test C++ code generation for type aliases #622

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

Comments

@Kronos3
Copy link
Collaborator

Kronos3 commented Feb 19, 2025

  • Implement
  • Test

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 using (C++11 syntax)

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 alias 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
@bocchino bocchino changed the title Generate type alias header files Implement and test C++ code generation for type aliases Feb 27, 2025
@bocchino bocchino added this to the v3.0.0 milestone Feb 27, 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

2 participants