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

core: Factor out visibility keyword parsing #2507

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

Moxinilian
Copy link
Contributor

This PR factors out the parsing of visibility keyword into core (like in MLIR) as visibility keywords are a property of the symbol infrastructure. While the symbol lookup in xDSL does not take it into account yet, it is useful to have it be part of the symbol infrastructure itself as those keywords are used in many places (for example, in func.func or hw.module).

@Moxinilian Moxinilian self-assigned this Apr 26, 2024
@Moxinilian Moxinilian added enhancement New feature or request core xDSL core (ir, textual format, ...) labels Apr 26, 2024
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.81%. Comparing base (b20359f) to head (be8d04d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2507      +/-   ##
==========================================
+ Coverage   89.78%   89.81%   +0.02%     
==========================================
  Files         350      351       +1     
  Lines       43284    43615     +331     
  Branches     6461     6509      +48     
==========================================
+ Hits        38863    39172     +309     
- Misses       3462     3485      +23     
+ Partials      959      958       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 873 to 874
with pytest.raises(ParseError):
parser.parse_visibility_keyword()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a match= to the pytest.raises()?
It might sound overkill but I find it neat to catch error-reporting regressions, which otherwise are just noticed months later by confused users and are tricky to trace back.

Copy link
Collaborator

@PapyChacal PapyChacal left a comment

Choose a reason for hiding this comment

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

Didn't even know that, wonderful, thanks!
Just a testing comment but good to go!

@Moxinilian Moxinilian merged commit 89d1f21 into xdslproject:main Apr 26, 2024
8 of 9 checks passed
@Moxinilian Moxinilian deleted the factor-visibility branch April 26, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants