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

Allow specifying the concrete type of an attribute in format_op #46

Open
vaivaswatha opened this issue Jan 12, 2025 · 0 comments
Open

Comments

@vaivaswatha
Copy link
Owner

vaivaswatha commented Jan 12, 2025

With 4770b78, the #[format_op] supports specifying attributes in an Op in the syntax, using $attr_name.

This prints (or parses) an AttrObj and gets / sets the corresponding the attribute in the Op. A minor downside of this is that, because we're printing / parsing a general AttrObj, the attribute's attr_id also must be / is printed (so that we know what attribute to parse). A way to avoid this is to allow specifying via a format directive, such as attr($attr_name, "::path::to::concrete::type"). With this, we can generate a printer / parser without the attr_id needing to be part of the syntax.

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

No branches or pull requests

1 participant