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 rewrite_result for AST nodes #6201

Closed
wants to merge 2 commits into from

Conversation

ding-young
Copy link
Contributor

Background

Since current rewrite method cannot track the context , this pr plans to implement rewrite_result method that returns Result. I will replace rewrite with rewrite_result in further pr.

Detail

Added a default implementation of the rewrite_result method, which calls the existing rewrite method and transforms the Option into a Result with a default error kind. Additionally, I implemented the rewrite_result method for the Chain and ast::Local types by copying the body of their respective rewrite functions and replacing some of the Option handling logic with appropriate error handling.

TODO & Question

@calebcartwright
Copy link
Member

Haven't had a chance to look at this, but just wanted to say I'm intrigued and excited by the title and description!

@ding-young
Copy link
Contributor Author

@calebcartwright Thank you so much for your interest! I've actually posted a tracking issue (#6206) for this project, where you can follow along with updates and progress.

@ding-young ding-young closed this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants