liufengyun / gestalt

gestalt : portable and solid macros for Scala
https://github.com/scalacenter/macros
31 stars 3 forks source link

Fix #40: splice on select #78

Closed liufengyun closed 7 years ago

liufengyun commented 7 years ago

Fix #40: splice on select

liufengyun commented 7 years ago

I added some helper constructors in this PR, also added Update, Pat.Var, Pat.Unapply, Pat.Ascribe, Pat.Tuple, Pat.Infix. Ident and Lit are assumed to be patterns. The types stay the same as type trees, this simplifies things while remains to be a fair assumption.

The main reason for having separate constructors for patterns is portability -- as those things are semantically very different from expressions.

But I don't think it's good to provide extractors for them, it's insane to change patterns in user-code, it's too brittle.

liufengyun commented 7 years ago

I'm merging this now, I hope quasiquotes are more robust now. There are certainly more bugs, but we can fix them gradually.