-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Various bugfixes and improvements for the quasiquotes #2910
Various bugfixes and improvements for the quasiquotes #2910
Conversation
This is needed for quasiquotes to implement SyntacticNew combinator.
1. Make superPos parameter optional with default value NoPosition 2. use Option instead of List for local optional constructor variable
1. blocks now match single term-level expressions to account for automatic block elimination. E.g. val q"{ ..$stats }" = q"foo" will match into stats = List(q"foo"). This is useful to uniformly deal with blocks on term level. 2. blocks in quasiquotes collapse into single expressions 3. Applied and TypeApplied now have constructors too which helps to unify matching and extraction in quasiquote reifier 4. TypeApplied now matches AppliedTypeTree too 5. Add Syntactic prefix to Applied and TypeApplied
Syntax spec mislead me to believe that annotation can't have type parameters or multiple argument lists... I guess the lesson here is don't trust the spec.
Sorry I didn't have time yet for a full review, I'll do that on Monday at the latest. What I've seen so far is really well structured, great work! |
I think this is just about ready to go, I'd just like #2910 (comment) addressed before merging. |
@retronym Yep, very much agree. Great work! |
After some discussion, we've decided to defer the refactoring of |
LGTM |
Various bugfixes and improvements for the quasiquotes
Fixes the following bugs:
Improves handling of the following language constructs:
And lastly:
Review by @retronym
Some discussion on the previous version of the pr.