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 Type Alias codegen #645

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Kronos3
Copy link
Collaborator

@Kronos3 Kronos3 commented Mar 3, 2025

Closes #622

@Kronos3 Kronos3 requested a review from bocchino March 4, 2025 05:02
}

private def getHppMembers: List[CppDoc.Member] = {
List(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use List.concat here instead of List(...).flatten.


private def getHOpenCPPGuard: CppDoc.Member = {
linesMember(addBlankPrefix(lines(
"""|#ifdef __cplusplus
Copy link
Collaborator

@bocchino bocchino Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we omit the #ifdef __cplusplus here? This is a C-only header, right? The extern "C" should go in the C++ header.


#include "Fw/Types/BasicTypes.h"

#ifdef __cplusplus
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's omit #ifdef __cplusplus extern "C" here and add extern "C" in the hpp file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement and test C++ code generation for type aliases
2 participants