-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport from #20 This PR introduces the `irfmt/printers` module with common printer functions. In #20 we implement `asm_format` directives as macros. These macros will use the printer functions defined here (and more to come). As secondary goal we want to make it easier for downstream developers to implement their own printers, while trying to keep some kind of standardized format. For this reason we also implement Printable for some more IR objects in pliron. The change also removes the `PrintableIter` trait in favor of the `list_with_sep` and `iter_with_sep` printer functions in the irfmt package. This change ensures that we have a single trait for printing in the library. As discussed in #21 we do not require developers to add the type_id or attribute_id manually to the printer anymore. `pliron` now implements a printer for TypeObj/AttribObj that will always print the IDs. --------- Co-authored-by: urso <steffen.siering at gmail.com> Co-authored-by: Vaivaswatha N <[email protected]>
- Loading branch information
1 parent
20223bb
commit 28164a0
Showing
17 changed files
with
308 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.