Skip to content

Split macro body check from interpreter #6831

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

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 10, 2019

Currently the same code is used to check that the macro bodies are valid and to interpret the tree.
Adding more functionality to the interpreters usually ends up affecting the validity check. This has proven to allow unexpected arguments to be accepted in the macro body.

The solution is to split the two implementations. The validity check will accept a subset of the trees that the interpreter can handle.

@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch 2 times, most recently from 6d9f314 to 489a396 Compare July 10, 2019 08:42
@nicolasstucki nicolasstucki marked this pull request as ready for review July 10, 2019 09:16
@nicolasstucki nicolasstucki requested a review from liufengyun July 10, 2019 09:24
@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch 2 times, most recently from 1764e28 to 73bf699 Compare July 11, 2019 09:29
@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch from b838d71 to 00c7125 Compare July 11, 2019 09:44
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@nicolasstucki nicolasstucki merged commit e2130b9 into scala:master Jul 11, 2019
@nicolasstucki nicolasstucki deleted the split-macro-body-check-from-interpreter branch July 11, 2019 20:14
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