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

Better function parsing #182

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Better function parsing #182

merged 1 commit into from
Jun 27, 2024

Conversation

hadley
Copy link
Member

@hadley hadley commented Jun 26, 2024

The original intent of this code (as much as I can remember) was to make it easier to generate multiline examples by wrapping them in an anonymous zero-argument function (the simplest structure that preserves srcrefs). But I'm not sure the code ever worked properly so I reimplemented it from first principles a considerably cleaner approach.

This is a robust alternative to the testing helper evaluate_(), allowing me to eliminate that helper.

The original intent of this code (as much as I can remember) was to make it easier to generate multiline examples by wrapping them in an anonymous zero-argument function (the simplest structure that preserves srcrefs). But I'm not sure the code ever worked properly so I reimplemented it from first principles a considerably cleaner approach.

This is a robust alternative to the testing helper `evaluate_()`, allowing me to eliminate that helper.
@hadley hadley requested a review from cderv June 26, 2024 21:44
@cderv
Copy link
Collaborator

cderv commented Jun 27, 2024

generate multiline examples by wrapping them in an anonymous zero-argument function (the simplest structure that preserves srcrefs).

Oh I see. I haven't noticed this - I was wondering initially why parse_all.function was used for.

@hadley hadley merged commit 084ae00 into main Jun 27, 2024
13 checks passed
@hadley hadley deleted the parse-function branch June 27, 2024 12:30
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