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

Derive macro: Printable #30

Merged
merged 4 commits into from
Mar 5, 2024
Merged

Conversation

urso
Copy link
Contributor

@urso urso commented Feb 18, 2024

WIP implementation of Printable derive macro. Still need to add tests and docstrings. The if format input parser has been updated to use combine to ensure we have only a single parser combinator library within the project.

Backport from #20 .

Follow ups
This PR only adds the Printable derive macro interpreting and translating the ir format input. We still might have to add some of the directives to pliron. The change is already quite big, so I opted to split the effort here.

@vaivaswatha
Copy link
Owner

@urso when do you think this can be ready? I was thinking of adding more content to the LLVM dialect and paused on that since it's simpler to use the feature in this PR for it rather than manually writing printers (and parsers).

@urso
Copy link
Contributor Author

urso commented Mar 5, 2024

I added some tests and doc strings.

Please keep in mind that most directives are not implemented yet. This will be done in a follow up PR. The Printable derive macro is not yet usable without those directives.

I did not document the ir_format string yet. I'm thinking to introduce a more complete documentation as a README.md file that we will also include as module doc when generating the documentation.

@urso urso marked this pull request as ready for review March 5, 2024 01:37
@vaivaswatha
Copy link
Owner

I added some tests and doc strings.

Please keep in mind that most directives are not implemented yet. This will be done in a follow up PR. The Printable derive macro is not yet usable without those directives.

oh ok. I thought this PR provided the Printable macro.

I did not document the ir_format string yet. I'm thinking to introduce a more complete documentation as a README.md file that we will also include as module doc when generating the documentation.

Sounds good.

@vaivaswatha
Copy link
Owner

shall I merge?

@urso
Copy link
Contributor Author

urso commented Mar 5, 2024

shall I merge?

Sure

@vaivaswatha vaivaswatha merged commit 4e8e400 into vaivaswatha:master Mar 5, 2024
5 checks passed
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.

2 participants